Jenny's Hobby Farm

(Previously Webelfin Design)

Jenny's Hobby Farm Home Page

I (Jenny ) used to be an assembler language programmer back in the days of the dinosaurs, nearly 50 years ago. I have written these pages for anyone who is now trying to learn the hex system of numbers that I used to have to interpret on a regular basis in the old days.

LEARN HOW TO COUNT IN HEX AND BINARY

Before you learn to count in Hex and Binary, you need to understand how we count in decimal.

Col 3 Col 2 Col 1   Decimal
equivalent
COUNTING IN DECIMAL REVISITED
    0
1
2
3
4
5
6
7
8
9
  0
1
2
3
4
5
6
7
8
9
Deci means 10 and we are using what is called 'Base 10' when we count in decimal. Base 10 means that each column can hold up to 10 numbers (zero and 1-9) before it has to be zeroed out, and 1 added to the next column to the left. We can put any one of 10 numbers in Column 1 (zero and 1-9).
  1
1
1
1
1
1
0
1
2
3
4
5
  10
11
12
13
14
15
When we are counting and we reach 9 in column1, the column is full and we zero it out. We then add 1 to Column 2 and a put a 0 in Column 1.

Another way of looking at it, is that col 1 shows the number of units, column 2 shows the number groups of ten, and col 3 holds the number of groups of one hundred.
382 is 3 groups of 100(=300), plus 8 groups of 10(=80), plus 2 units(a unit being the number 1)


Col 3 Col 2 Col 1   Decimal
equivalent
COUNTING IN HEX (hexadecimal)
    0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
  0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Hexadeci means 16 and we are using what is called 'Base 16' when we count in Hex (Hexadecimal).
Base 16 means that each column can hold up to 16 numbers before it has to be zeroed out, and 1 added to the next column to the left.
We can put any one of 16 numbers in Column 1 (zero and 1-9 and A-F).
  1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
  16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
When we are counting and we reach F (the equivalent of 15 in decimal) in Column 1, Column 1 is full and we zero it out. We then add 1 to Column 2 and a put a 0 in Column 1.
  2 0   32 Again, we can count up to F before we have to zero out col 1 and add another 1 to col 2
  F F   255 If we keep on counting in this manner, adding 1 to col 2 every time col 1 reaches F, we fill up cols 1 and 2 to a value of FF.
1 0 0   256 Adding 1 more means we have to zero out col 1 and add 1 to col 2. However, this makes col 2 = F+1. So we have also to zero out col 2 and add 1 to col 3


Col 4 Col 3 Col 2 Col 1   Decimal Hex COUNTING IN BINARY
0
0
0
0
0
0
0
1
  0
1
0
1
Binary means 2 and we are using what is called 'Base 2' when we count in Binary.
Base 2 means that each column can hold up to 2 numbers (zero or one) before it has to be zeroed out, and 1 added to the next column to the left.
0
0
0
0
1
1
0
1
  2
3
2
3
To make binary 2, we add 1 to binary 1. However Column 1 already has 1 in it and is full. We must zero it out and add 1 to Column 2 and a put a 0 in Column 1.
For the next number (binary 3) we can just add 1 to column 1
0
0
0
0
1
1
1
1
0
0
1
1
0
1
0
1
  4
5
6
7
4
5
6
7
To make binary 4 we must add 1 to binary 3.
Col 1 already has 1 in it, so we zero out col 1 and add 1 to col 2. However, this makes col 2 also equal to 1 + 1. So we have also to zero out col 2 and add 1 to col 3
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
  8
9
10
11
12
13
14
15
8
9
A
B
C
D
E
F
This is how rest of the numbers go up to 15