- Single binary value (
0
or1
) is a bit (b
). - A group of 8 binary digits is a byte (
B
) - A nibble is half of a byte (4 bits))
A protocol of communication: Bitsize - how many bits are in a message. Bitrate - no. of bits transmitted each second.
8 bits can store up to 255 values. 16 bits can store up to 65536 values.
Are stored as number of seconds from 00:00:00 UTC Jan 1 1970. We'll run out of bits on 03:14:07 UTC Jan 19 2038.
ASCII - basic set, letters, numbers, symbols (128 out of 255 possible combinations for a byte). ANSI tried to codify the rest.
Unicode - newer standard that includes more characters. Each symbol is represented by U+
+hex string
UTF-8 - standard for storing Unicode. U+
+1-6 bytes.
There ain't no such thing as plain text - there are only bytes, so one has to know the encoding to know what the bytes mean. In HTML, <meta charset="utf-8" />
can be understood when it's on top of the document, because almost every encoding does the same with bytes 32-127 (can be read as anything to determine as what it should be read).
Is generally about finding repeting patterns. Lossy = when decompressed, will not be exactly as original.
Bitlength is how many bits are used to represent the number. If some of the bits are unused then they’re just set to 0 (left-pad).
integers, floats, doubles - Floats and doubles use a decimal point (e.g. 1.9395
) but a float has a bitlength of 32, while a double has a bitlength of 64.
A signed number is one that can be either negative or positive. Unsigned numbers are always assumed to be positive.
Endian - means whether the number should be read from left to right or right to left. Big-endian - the digits on the left are “bigger”.