Bit
Smallest unit of information a computer can store. 1 or 0.
Code
Association of a sequence of bits with information. Standards such as ISO and IEEE ensure consistent interpretation across systems.
Binary Encoding
All data is ultimately stored as sequences of bits.
- Unsigned integer: binary (base-2). 8-bit unsigned: 0 to 255.
- Signed integer: two’s complement. 8-bit signed: -128 to 127.
- Floating-point: IEEE 754. 32-bit single precision, 64-bit double precision.
Endianness
Byte order in which multi-byte values are stored in memory.
- Big-endian
Most significant byte at the lowest address. Used in network protocols (network byte order). - Little-endian
Least significant byte at the lowest address. Used by x86 processors.
Character Encoding Standards
ASCII
Uses 7 bits per code. 1 unique combination per English character. Includes both printable and unprintable characters.
Unicode
Covers scripts for all major writing systems. Designed as the superset of ASCII.
UTF-8
Variable-length encoding of Unicode. ASCII characters use 1 byte; others use 2 to 4 bytes. Most common encoding for web content.
UTF-16
Variable-length encoding. Uses 2 or 4 bytes per character. Common in Windows and Java internals.