Wednesday, 6 May 2015

Lesson

Binary data is base 2 as in 1's or 0's
a bit is 1 number, 4 bits are a nibble and 8 bits are a byte
Kilobyte=1024 bytes because it is 2^10
          128,64,32,16,8,4,2,1
132=      10000100
96=        01100000
10=        00001010
254=      11111110
67 =       01000011
102=      01100110
59 =       00111011
            128,64,32,16,8,4,2,1
00101111 = 47
01111110 = 126
11111111 = 255
11011101 = 29+192 = 223
11001000 = 8 + 192 = 200

           8,4,2,1
0101+         1010+       0010+   1100+       1110+
0110            0100        0011      0001         0010
_____           ____         _____     ____          ____
1011 = 11   1110=14   0101=5 1101=13  10000=16 (stack overflow)
1                                     1                          111

128,64,32,16,8,4,2,1
10000000+            00111110+         011000010+
00100000              00110010           000000100
_________              _________          ___________
10100000    =160  01110000=112  011000110=102
                                 11111          

8,4,2,1  012346789ABCDEF
01101010 =   6A
11111110 =    FE
00100000 =   20
00100010 =    22
A1= 161
DF= 208+15= 223
79= 112+9=121
33= 51
C4= 196
7B=123

Gigabyte=1024^2 kilobytes
Petabyte=8*1024^5
Yotta=8*1024^6
6). What is base 10 base 2 and base 16? Denary, binary, hexadecimal
7). Hexadecimal is used to convert binary because each character represents a nibble
8). Write a simple Python program that works out bits/bytes or converts binary to denary or hexadecimal
 

No comments:

Post a Comment