# Jenny's Hobby Farm

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 Decimalequivalent COUNTING IN DECIMAL REVISITED 0123456789 0123456789 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). 111111 012345 101112131415 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 Decimalequivalent COUNTING IN HEX (hexadecimal) 012345678 9ABCDEF 0123456789101112131415 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). 1111111111111111 0123456789ABCDEF 16171819202122232425262728293031 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 00 00 00 01 01 01 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. 00 00 11 01 23 23 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 0000 1111 0011 0101 4567 4567 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 11111111 00001111 00110011 01010101 89101112131415 89ABCDEF This is how rest of the numbers go up to 15