Eli5 Binary and hexadecimals

205 views

I’m struggling in class with understanding and calculating😭😭 It’s just not clicking for me

In: 6

9 Answers

Anonymous 0 Comments

Binary is base two.

1 is 1.

2 is 10.

3 is 11.

4 is 100.

Hexadecimal is base sixteen. Works the same as any other base, but we need letters to go past nine, hence A-F for 10 through 15.

What’s nice between binary and hex is that one hex character is four binary characters mushed together.

0 = 0000

1 = 0001

2 = 0010

3 = 0011

4 = 0100

5 = 0101

6 = 0110

7 = 0111

8 = 1000

9 = 1001

A = 1010

B = 1011

C = 1100

D = 1101

E = 1110

F = 1111

So, any binary number can be made into a hex number with 1/4 the characters.

It’s useful to have a high base around, even if you’re thinking in binary. We’re used to ten, but as you’ve seen converting to and from binary and base ten is annoying. Base sixteen makes the algorithm easy: just count every four binary digits, add them up as if it were just those four digits, and add the value to the hex number as one more hex digit. Going the other way is even easier, take the hex number one character at a time and spit out the 4-digit binary equivalent.

You are viewing 1 out of 9 answers, click here to view all answers.