KEY
This crash course in basic mathematics uses standard suffix denominations on all numbers to denote which number base is being shown.
b = Binary
d = Dinary
o = Octal
h = Hexadecimal
A byte can represent any number up to 255 and is comprised of 8 bits. The value of each bit doubles so that each unique bit combination provides a different number. The value of the last bit is 1, with each proceeding bit doubling in value.
00000001b = 1d
00000010b = 2d
00000011b = 3d
00000100b = 4d
00000101b = 5d
and so on
There are 256 bit combinations (0-255), when combining 2 bytes together (called a word) this gives values up to 256x256=65535. 4 bytes together is a long word or double word and can value up to 256x256x256x256=4294967295. We have to count zero as the first possible combination, which is why all these numbers are 1 under the number of combinations possible.
Bytes are often represented with hexademial. Hexadecimal is a process where each character can be a value of 0-15, rather than our normal numbering system called dinary 0-9. Binary is simply another numbering system 0-1. There is also octal 0-7.
To physically represent the hexadecimal values of 10 or more we start using the alphabet.
10d = Ah
11d = Bh
12d = Ch
13d = Dh
14d = Eh
15d = Fh
Using two hexadecimal characters together allows us 256 combinations, so bytes are frequently represented in this manner. ie. FFh 0Bh 4Eh.
I see you are intending to write a machine code compiler. I applaud your zeal, but must express that I have a niggling doubt that your project is possible for you at this time given that you did not know this. I would encourage you to rethink it, or perhaps I have missunderstood your intentions.
Pneumatic Dryll
