200 likes | 423 Views
Programmeren (2.9). assembler, hogere programmeertaal compiler, interpreter line-oriented, structured, OO. Getalrepresentaties. Tientallige stelsel (decimaal). Bijvoorbeeld: 1523 (cijfers 0 t/m 9 ). Achttallig stelsel (octaal). Bijvoorbeeld: 2763 (cijfers 0 t/m 7 ).
E N D
Programmeren (2.9) assembler, hogere programmeertaalcompiler, interpreterline-oriented, structured, OO Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Getalrepresentaties Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Tientallige stelsel (decimaal) Bijvoorbeeld: 1523 (cijfers 0 t/m 9) Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Achttallig stelsel (octaal) Bijvoorbeeld: 2763 (cijfers 0 t/m 7) Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Tweetallig stelsel (binair) Bijvoorbeeld: 10111110011 (cijfers 0 en 1) Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Zestientallig stelsel (hexadecimaal) Bijvoorbeeld: 5F3 (cijfers 0 t/m 9 en letters A t/m F) Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Omrekenen van dec naar hex 1523dec 1523 delen door 16 -> gaat 95 keer; rest 3 1520 delen door 256 -> gaat 5 keer; rest 240 1280 delen door 4096 -> gaat 0 keer; rest 1280 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Bits, nibbels, bytes en words MSB LSB 31 16 15 8 7 4 3 0 bit nibble byte 16 bits Word 32 bits word Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Binaire waarden weergeven bin 01001110001010001010110001100011 hex 4 E 2 8 A C 6 3 Bepaal zelf de octale waarde Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Let op verschil met bv kΩ Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Binair optellen 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 10 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Binair vermenigvuldigen 0 x 0 = 0 0 x 1 = 0 1 x 0 = 0 1 x 1 = 1 Zeer eenvoudige tafel: Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Binaire deling Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Negatieve getallen : sign-magnitude DEC BIN Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Complement Welke waarde krijgt - 45 ? N – 10000 = - 45 N = 10000 - 45 = 9955 9955 is het 10-complement van 45 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
2-complement methode DEC BIN Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
+3 = 00000011 1-complement = 11111100 (inverse) Tel er 1 bij op 1 + -3 = 11111101 Veranderen van teken bij 2-complement Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Niet gehele getallen 3,14 kan geschreven worden als 0,314 x 101 Wanneer afgesproken wordt dat de komma altijd op de zelfde plek staat hoef alleen 314 (mantisse) en 1 (exponent)te worden opgeslagen. Voor binaire waarden geldt dit ook. Fixed point Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Institute of Electrical and Electronics Engineers ANSI-IEEE 754-1985 float 1 8-bits 23-bits sign exponent fraction 1 11-bits 52-bits double Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
Opdracht • Bestudeer paragraaf 3.1 en 3.2 • Opgaven 1 t/m 5 (pag 35) • Practicum … Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology