|
|
Example: the byte at address 0 contains the binary number 00000101
One (1) byte can store one of these 256 different binary numbers:
00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 00001010 00001011 00001100 00001101 00001110 00001111 00010000 00010001 00010010 00010011 00010100 00010101 00010110 00010111 00011000 00011001 00011010 00011011 00011100 00011101 00011110 00011111 00100000 00100001 00100010 00100011 00100100 00100101 00100110 00100111 00101000 00101001 00101010 00101011 00101100 00101101 00101110 00101111 00110000 00110001 00110010 00110011 00110100 00110101 00110110 00110111 00111000 00111001 00111010 00111011 00111100 00111101 00111110 00111111 .... (And so on... - too many to list them all out) |
One (1) byte can store one of these 256 different binary numbers:
00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 00001010 00001011 00001100 00001101 00001110 00001111 00010000 00010001 00010010 00010011 00010100 00010101 00010110 00010111 00011000 00011001 00011010 00011011 00011100 00011101 00011110 00011111 00100000 00100001 00100010 00100011 00100100 00100101 00100110 00100111 00101000 00101001 00101010 00101011 00101100 00101101 00101110 00101111 00110000 00110001 00110010 00110011 00110100 00110101 00110110 00110111 00111000 00111001 00111010 00111011 00111100 00111101 00111110 00111111 .... (And so on... - too many to list them all out) |
Each
binary number will
represent
exactly
1 numeric value
(e.g.:
00000000 = zero (0),
00000001 = one (1),
and so on.)
One (1) byte can store one of these 256 different binary numbers:
00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 00001010 00001011 00001100 00001101 00001110 00001111 00010000 00010001 00010010 00010011 00010100 00010101 00010110 00010111 00011000 00011001 00011010 00011011 00011100 00011101 00011110 00011111 00100000 00100001 00100010 00100011 00100100 00100101 00100110 00100111 00101000 00101001 00101010 00101011 00101100 00101101 00101110 00101111 00110000 00110001 00110010 00110011 00110100 00110101 00110110 00110111 00111000 00111001 00111010 00111011 00111100 00111101 00111110 00111111 .... (And so on... - too many to list them all out) |
Each
binary number will
represent
exactly
1 numeric value
(e.g.:
00000000 = zero (0),
00000001 = one (1),
and so on.)
Therefore:
|
One (1) byte can store one of these 256 different binary numbers:
00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 00001010 00001011 00001100 00001101 00001110 00001111 00010000 00010001 00010010 00010011 00010100 00010101 00010110 00010111 00011000 00011001 00011010 00011011 00011100 00011101 00011110 00011111 00100000 00100001 00100010 00100011 00100100 00100101 00100110 00100111 00101000 00101001 00101010 00101011 00101100 00101101 00101110 00101111 00110000 00110001 00110010 00110011 00110100 00110101 00110110 00110111 00111000 00111001 00111010 00111011 00111100 00111101 00111110 00111111 .... (And so on... - too many to list them all out) |
Each
binary number will
represent
exactly
1 numeric value
(e.g.:
00000000 = zero (0),
00000001 = one (1),
and so on.)
However:
|
Solution:
|
Example: Combining two (2) adjacent bytes creates a cell of 16 bits that can store one of 216 different binary numbers:
Each pair of adjacent bytes can store one larger 16 bits binary number
Consider 2 adjacent box - each box contains a small sheet of paper with a 2 digits (decimal) number:
You can interpret the values on the papers in different ways:
|
Due to the way that computer memory is constructed, the computer system imposes this restriction:
|
Example:
Example:
cells at address 0, 1 can be
combined into a
16 bit memory cell with
address 0
Example:
cells at address 4, 5 can be
combined into a
16 bit memory cell with
address 4
Example:
cells at address 5, 6
cannot be
combined !!
(because address 5 is
odd)
|
Combining 4 consecutive memory cells:
|
Example:
Example where the computer will combine 4 consecutive memory bytes:
|
DEMO: demo/Alignment/align.c
|