[2] Redstone Computing Fundamentals | Binary and Hexadecimal

Binary as well as hexadecimal are intimidating when first viewed, although both are really simple. If you are familiar with base 10, then you are good to know. Just a quick recap on base 10:

README

I am not the best teacher, if I used the wrong terms or some other clearly incorrect wording, please let me know.

Recap of base 10

Base ten means each place can store some value of ten. The first place is the ones place, from 0 to 9. Each value in the ones place is worth its own value.

You are likely familiar with the idea of columns in base ten, since you learned these when you began breathing. If you are not, don’t fret- the skill is easy to learn! (I never understood it in school)

After the ones place, you have the tens place, and each value of 0 to 9 in the tens place is multiplied by ten, or each number is worth ten of itself. This repeats forever, to the hundreds, thousands, ten thousands, hundred thousands, millions, etc

This also repeats with negatives, just the other way around. This also repeats with decimal, such as the numbers in the tenths place being worth 10% of itself, or a tenth of itself.

Now, binary. If you read the above to learn about how columns in numbers work, then you can get the hang of this easily.

Binary

Binary is like base ten, but instead of having ten values in each number column, you only have two- a one or a zero. The columns also work differently- instead of each next column being worth ten times the previous one, it is only worth two times the previous column.

A table to understand this more easily is shown below, although remember that the LSB (least significant bit) is represented on the right when shown. Just remember to flip it over.

32 16 8 4 2 1
0 1 1 0 1 0

In this table, I have created the number 22 (010110). Each column is either worth none or all of itself, indicated by zero (being zero) or a one (being worth it’s column value).

Hexadecimal is more complicated, but still easy to get the hang of with practice.

Hexadecimal

Hexadecimal, in terms of bases, is base 16. Now, don’t be scared, its just like base ten or base two, just that each column is some multiple of 16. Instead of having 1 through 9, hexadecimal has 1 through F. Still confused? Here is every “number” of hexadecimal laid out in a simple to understand line.

0 1 2 3 4 5 6 7 8 9 A B C D E F

A is worth 10, B is worth 11, and so on. F is worth 15.

Hexadecimal has sixteen numbers rather than ten. Here is another table, and me writing 432 (1B0 in hexadecimal) with it. Note that numbers written in hexadecimal are reverse from what is shown in a table or some other graphical representation. (as the LSB is on the right).

1 16^1 16^2 16^3 16^4 16^5
0 B 1

Without the exponents (just for simplification)

1 16 256 4,096 65,536 1,048,576
0 B 1
1 Like