Binary

From Data Crystal
Revision as of 08:02, 20 October 2005 by Labmaster (talk | contribs) (→‎Word: fixed wikipedia link)
Jump to navigation Jump to search

Binary or base 2 is the number system used natively by computers. It uses only the digits 0 and 1. It is useful in ROM hacking especially when a value actually consists of multiple values, which do not take a multiple of eight bits each. For example, the SNES color format consists of fives bits for each of the red, green, and blue color components in a word.

More non-ROM hacking specific information can be found at Wikipedia's binary article.

Terminology

Bit

Each digit in a binary number is referred to as a bit.

More non-ROM hacking specific information can be found at Wikipedia's bit article.

Nybble

A nybble or nibble is a group of four bits. Most computers cannot read or write single nybbles, but they are notable since every hexadecimal digit represents exactly one nybble.

Byte

A byte is a group of eight bits. This is the smallest grouping which most computers can work with directly. Some formats may involve smaller divisions like the SNES color format mentioned above, but special code must be used to deal with this.

More non-ROM hacking specific information can be found at Wikipedia's byte article.

Word

A word is the natural unit of data for a given architecture. Unlike the previous terms, the size of a word varies from system to system. A word is usually a power of two time the size of a byte - generally 16 bits (two bytes), 32 bits (four bytes) or 64 bits (8 bytes). For example, a word on a GBA is 32 bits, whereas on a NES it is 16 bits. The order of these bits depends on the endianness of the machine. From this term, comes halfword (hword), for a unit of data half of the word size, double word (dword) for double the word size and quadruple word (qword) for eight times the word size.

More non-ROM hacking specific information can be found at Wikipedia's Word_(computer_science) article.

See Also

So very stubbly.
This page is rather stubbly and could use some expansion.
Are you a bad enough dude to rescue this article?