A byte has got eight bits and is an unit of the information or storage capacity. This eight bits can be switched in 8 to the power of 2 wise (also 256 sorts of states). In a few computer systems, software or coding languages exists another or unexactly definition of bytes. Another fragmentation of Bytes are nibbles (this are 4 bits) or 2 half-byte.
The normal character set of a computer system consists of ASCII or ANSI, which has got 256 different chars. A byte can also content a char ("A" is the byte "01000001" or the decimal value 65).
Low- / High-Byte
8-bit computer systems like the C64/C128 have 16-bit address widths, so they can address 64KB of memory. So it takes two 8-bit bytes to store a complete, 16-bit memory address. The standard order for memory address bytes is low-order byte first, followed by the high-order byte. For instance, the absolute memory address $C000 (49152 decimal) is stored in two, consecutive RAM bytes as $00, followed by $C0.
As a further example, the assembly instruction LDA $C000, is stored as three bytes. The first is the instruction itself with the absolute addressing mode: $AD, followed by $00 and $C0. The processor fetches the last two bytes as the address $C000.
The system's requirement for byte order is completely arbitrary and was decided on by the CPUs design engineers. In computer science, this choice of byte order is known as "endian-ness" with each individual CPU architecture being either "big endian" (high byte first) or "little endian" (low byte first). The 6502 falls into the latter category.
- 1 Kilobyte (KB / KiB) are 1024 bytes
- 1 Megabyte (MB / MiB) are 1024 Kilobytes are 1024*1024 bytes
- 1 Gigabyte (GB / GiB) are 1024 Megabytes
- 1 Terabyte (TB / TiB) are 1024 Gigabytes
- 1 Petabyte (PB / PiB) are 1024 Terabytes
By more than 1024 bytes it is better to use the international prefixs. For disks the storage capacity is used in KBytes, whereas for CDs and harddisks are preferred in MBytes and higher storage media like DVD and actual harddisks are produced in GBytes.