Lec3 CSC 101 ICT
Lec3 CSC 101 ICT
Lecture 3
Assignment 1:
000
A single bit can store Two bits can store Three bits can store
00 001
0 two distinct values four distinct values eight distinct values
01 010
1 10 011 North
e.g. “yes” or “no” e.g. “left”, “right”, North-East
11 100 North-West
“up”, “down”
101
110
East
111 West
35
2 17 - 1
2 8 - 1 1 0 0 0 1 1
2 4 - 0 1 * 25 + 0 * 24 + 0 * 23 + 0 * 22 + 1 * 21 + 1 * 20 = 35
2 2 - 0 Binary to Decimal Conversion
2 1 - 0
Decimal to Binary Conversion, 6 bit representation
0 0 1 0 0 0 1 1
0 * 27 + 0 * 26 + 1 * 25 + 0 * 24 + 0 * 23 + 0 * 22 + 1 * 21 + 1 * 20 = 35