Number Systems
From Sonic Retro
Revision as of 08:05, 3 October 2020 by Ccawley2011 (talk | contribs)
|
This file or page has been flagged for relocation to Retro CDN, the Wikimedia Commons-esque service for all Retro wikis. This message is for the benefit of Sonic Retro wiki staff. |
---|
Number Bases
Basics
Number Bases are a core mathematical concept in the place-value number representation system. Put simply, a number base is the number of values that one place-value can represent. If one goes over this value, the next place-value must be used. Humans typically count in base 10, or decimal. Computers count (and "think") in binary. Binary numbers are the most basic command that a computer can be given — they act like small on/off switches working in tandem. However, to even issue a basic command (such as typing the letter "a"), many binary commands are used, so humans use base 16, or hexadecimal, to shorten long binary numbers (which are quite common).
A binary number looks like this:
0001 0001 1101 0111
The same number in hexadecimal is:
11D7
And in decimal:
4,567
-One thing to note is that sometimes people refer to "Decimal" format as "Denary" format.
Binary
Notice that our binary number was grouped into fours. We do this for the same reason that we group decimal numbers into threes - to make them more readable. Look at it without the digit grouping:
0001000111010111
Obviously, it's far more readable with the grouping. Those groups of fours are also called nybbles.
This brings up another part of the binary system - terminology. A bit is simply a digit - the word is a shortening of "binary digit". The term "bit" takes the place of "place value" when speaking of binary numbers. A nybble is a collection of four bits, or half of a byte. A word is two bytes, and a longword is two words. There are terms for longer strings of binary numbers, but these are the only ones really relevant to the Mega Drive.
Hexadecimal
Binary numbers can get quite long. That's why we use hexadecimal. The main advantage with this is that it's really easy to convert hex numbers to binary and vice versa. A quick reference chart is below.
Hex | Bin | Dec |
---|---|---|
0 | 0000 | 0 |
1 | 0001 | 1 |
2 | 0010 | 2 |
3 | 0011 | 3 |
4 | 0100 | 4 |
5 | 0101 | 5 |
6 | 0110 | 6 |
7 | 0111 | 7 |
8 | 1000 | 8 |
9 | 1001 | 9 |
A | 1010 | 10 |
B | 1011 | 11 |
C | 1100 | 12 |
D | 1101 | 13 |
E | 1110 | 14 |
F | 1111 | 15 |
References