Skip to content
Snippets Groups Projects
Commit a3e006e9 authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Beispiele 16.11.2023

parent a93e5bdd
Branches
No related tags found
No related merge requests found
#include <stdio.h>
int main (void)
{
printf ("6 & 3 = %d\n", 6 & 3);
printf ("6 && 3 = %d\n", 6 && 3);
return 0;
}
42 = 4.2e1
Vorzeichen = +1
Mantisse = 4.2
Exponent = 1
--> binär: nicht als Zehnerpotenz speichern, sondern als Zweierpotenz
00101010 = 101010 · 2^0 1 = 1 · 2^0
= 1.0101 · 2^4 = 0.1 · 2^1
= 0.10101 · 2^5 = 0.01 · 2^2
= 0.0010101 · 2^7
Zahl "normalisieren": Die erste Binärziffer ist immer eine 1.
--> Wenn das eh klar ist, braucht man die 1 ja nicht mit abzuspeichern.
Weitere Details: https://de.wikipedia.org/wiki/IEEE_754-2008
File added
File added
File added
File added
File added
20231116/smiley.png

594 B

#define smiley_width 14
#define smiley_height 12
static char smiley_bits[] = {
0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0xA4, 0x04, 0x04, 0x04, 0x02, 0x08,
0x12, 0x09, 0xE2, 0x08, 0x04, 0x04, 0x08, 0x02, 0xF0, 0x01, 0x00, 0x00,
};
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment