Example:
|
Example:
Memory device in state 0 | Memory device in state 1 |
---|---|
|
can be in one of 2n states !
A row of 3 switches can be in one of 23 = 8 states.
The 8 possible states are given in the figure above.
Recall: we can use numbers to represent marital status information:
|
Example:
|
The representation scheme has a chic name:
|
Note to lecturer:
|
|
That means that you can only use the digits 0 and 1 to write a binary number
Example: some binary numbers
|
Binary number | Value encoded by the binary number |
---|---|
dn-1 dn-2 ... d1 d0 | dn-1×2n-1 + dn-2×2n-2 + ... + d1×21 + d0×20 |
Example:
Binary number | Value encoded by the binary number |
---|---|
0 | 0×20 = 0 |
1 | 1×20 = 1 |
10 | 1×21 + 0 ×20 = 2 |
11 | 1×21 + 1 ×20 = 3 |
1010 | 1×23 + 0×22 + 1×21 + 0×20 = 8 + 2 = 10 |
(Read: there are binary 10 (= 2) types of people: those who understand binary (numbers) and those who don't)
|
|
|
|
|
|
Therefore, one byte can store one of 256 possible values
(You can store the number 34 into a byte, but you cannot store the number 556, the value is out of range)
|
Schematically:
A 16 bits memory cell can store one of 216 = 65536 different patterns.
Therefore, it can represent (larger) numbers ranging from: 0 − 65535.
Example: how a computer can use 2 consecutive bytes as a 16 bits memory cell:
The bytes at address 0 and address 1 can be interpreted as a 16 bits memory cell (with address 0)
|
|