Jump to content
  • Advertisement
Sign in to follow this  
Kenny77

Octal and Hexadecimal Numbers

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
They are numbers written in a different base sytem than decimal.

Octal numbers are base 8, so only contain the numerals 0,1,2,3,4,5,6,7.

Hexadecimal numbers are base 16, so contain 0,1,2 ... 13,14,15. numbers 10 - 15 are commonly written A-F, so you get 0,1,2....,9,A,B,C,D,E,F.

These bases are used because they map to binary nicley, both being powers of two.

If you've never used binary before, I suggest you look it up.

Share this post


Link to post
Share on other sites
Binary (base 2): 101 = (1*2^3) + (0*2^2) + (1*2^1)

Octal (base 8): 101 = (1*8^3) + (0*8^2) + (1*8^1)

Decimal (base 10): 101 = (1*10^3) + (0*10^2) + (1*10^1)

Hex (base 16): 101 = (1*16^3) + (0*16^2) + (1*16^1)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!