Binary
In computers data is represented by 0s and 1s.
This number system is called binary or base 2 number system.
It is called base 2 because there are only 2 unique numbers that can be used in this system.
Binary is represented by 1 or 0
1 = ON = TRUE
0 = OFF = FALSO
Why Binary?
Modern computers are digital where there are 2 possible states of ON and OFF.
ON is represented by 1
OFF is represented by 0
Computers are made of switches which can only have 2 states.
1 = ON = YES = TRUE
0 = OFF = NO = FALSE
Because we can only have 2 states, we use binary!
Denary to Binary
Hexadecimal
Decimal to Binary
Binary to Decimal
Binary to Hexadecimal
Hexadecimal to Binary
Decimal to Hexadecimal
Hexadecimal to Decimal
Bit, Nibble and Byte
How Computers Store Numbers
Character Representation
Two systems used for character representation:
- ASCII – Uses 8 bits – 256 possible characters
- Unicode – Uses 16 bits – 65536 possible characters
Pictures
Pixel is a tiny dot on a screen. Black and white images are represented by black and white pixels. 1 represents a black pixel and 0 represents a white pixel.
Metadata provides data about the image, such as:
- created date
- type
- resolution
- author
Sound
Sounds waves are analogue. To be represented in a computer, they need to be converted to binary. Sampling is when sound is recorded in intervals. These samples are then converted to binary. The closer the sampling intervals, the better the quality of the sound.
Hertz
- Sample rates are measured in hertz.
- 1 hertz = 1 sample/second
Data Compression
Compression is a process where the amount of data in a file is reduced for easier transfer and storage. Two main methods of data compression are lossy and lossless.