Public Group

# binary and hex

This topic is 3838 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am having some trouble grasping the concept of binary and hexademical numbers. Can someone please point me towards a decent explanation of them.

##### Share on other sites
I'll quickly try to explain it as well as I can...

First, lets start with the normal number system. It is also known as "Decimal". The prefix Dec- means 10 which is exactly what the system has. Decimal is a system of 10 different values (0 through 9). At the most basic level, that is how the designations work. Binary is based on the prefix Bin- which means 2. Consequently binary is a system of two discrete values, 0 and 1 (Number systems start as 0). Hex is a shortened form of hexidecimal. Hex means six, and Dec means 10 so if you put them together, you get a number system of 16 discrete values. Since there are only 10 numerical digits as we know them, we use letters for the rest so that gives us 0-9 and A-F.

So, that gives up an equivilency of:
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

At the most basic level, it is as simple as that. The next thing is converting between the different systems. Converting between decimal and binary is very easy, since each place is equal to 2^(the space - 1). But thats for another post.

##### Share on other sites
Base-10 numbers, the numbers you deal with everyday, can all be written as sums of powers of 10. For example, we can rewrite 1234 as

1*10^3 + 2*10^2 + 3*10^1 + 4*10^0 = 1000 + 200 + 30 + 4 = 1234

Similarly, with binary (base-2) we can rewrite numbers as sums of powers of 2. For example we can rewrite 1011

1*2^3 + 0*2^2 + 1*2^1 + 1*2^0 = 8 + 0 + 2 + 1 = 11 (in base-10)

It should now be no surprise that we can do the same with base-16. For example 1A3 (remember A = 10)

1*16^2 + A*16^1 + 3*16^0 = 256 + 160 + 3 = 419 (in base-10)

##### Share on other sites
omg I actually got 90% of those jokes..... I'm So ASHAMED ;7(= ooooohhh look at that I got a gote and a nose!!! ;7(= look sideways

##### Share on other sites
Might I ask why you're trying to learn these?

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 27
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634100
• Total Posts
3015527
×