# Unit 3 Fundamentals of data representation Comp sci

- Created by: Penfred
- Created on: 05-05-21 09:46

# Section 3 - Fundamentals of data representation

## Storage units and binary numbers

1 bit = 1 unit of binary ( 1 or 0)

1 nibble = 4 bits

1 byte = 8 bits

1 kilobyte = 1000 bytes

1 megabyte = 1000 kilobytes

Hopefully you know how to count in binary

## Binary arithmetic and hexadecimal

Adding in binary is also simple, it's just like denary except each column can only have 1 so if it hits 2 you have to carry over.

An overflow error is where you need an extra bit to carry over but you do not have an extra bit.

Shifting a binary number to the left doubles it

Hexadecimal counts to 16 instead of 10 and 2

It goes: 0 1 2 3 4 5 6 7 8 9 A B C D E F

Converting binary to hexadecimal is easy.

1010 0101

Look at the first 4 numbers and find out the value and then look at the next 4 numbers and do the same

For this example you wend end up with A and 5, so you put them together and you get A5

Hexadecimal is used because it's expressed more compactly than binary and is easier to understand.

Picking colours is 1 application for it.

## ASCII and Unicode

ASCII uses binary to represent every character on the keyboard. It uses 7 bits…

## Comments

No comments have yet been made