# 1.2.3/4 - Units & Data Storage Flashcards

How do you calculate data capacity?

Text file:

- Bits per character x Number of characters

Image file:

- Colour Depth x Image Height (pixels) x Image Width (pixels)

Sound file:

- Sample rate x Duration (s) x Bit Depth

What are the units of data storage?

- Bits
- Nibble (4 bits)
- Byte (8 bits)
- Kilobyte (1000 bytes)
- Megabyte (1000KB)
- Gigabyte (1000MB)
- Terabyte (1000GB)
- Petabyte (1000TB)

Why must data be stored in binary format?

- Computers use on/off signals
- Binary has two states : 0 and 1
- These states can represent the on/off signals

List the Hexadecimal characters 10-15

10 - A

11 - B

12 - C

13 - C

14 - E

15 - F

How do you convert Denary to Binary?

Use a binary number line

eg. 89 to Binary

128 64 32 16 8 4 2 1

0 1 0 1 1 0 0 1

How do you convert Denary to Hexadecimal?

- Convert denary number to binary
- Group into 2 nibbles (groups of 4)
- Add up the nibbles then convert into the hex characters

eg. 230 to Hexadecimal

1 1 1 0 | 0 1 1 0

8 4 2 1 | 8 4 2 1

E 6

How do you convert Hexadecimal to Denary?

- Turn each character into a nibble
- Binary -> Denary convert

eg. A6 to Denary

A = 10 | 6 = 6

1 0 1 0 | 0 1 1 0

128 + 32 + 4 + 2 = 166

How do you add two Binary Integers together?

1 + 0 = 1

1 + 1 = 0 carry 1

1 + 1 + 1 = 1 carry 1

eg.

n | 0 0 1 1 1 0 1 1

n | 0 1 1 1 1 1 0 0

a | 1 0 1 1 0 1 1 1

c | 1 1 1 1

How do you do a Binary Shift?

- Move the numbers to the left or right
- Denary number doubles when shifted left, halved when shifted right

eg. Left shift

0 0 1 1 0 1 0

0 1 1 0 1 0 0

What are the Most/Least Significant Bits?

MSB : 128, represents biggest value

LSB : 1, represents the smallest value

What is an Overflow Error?

- A binary 1 goes beyond the capacity of the storage line
- Max denary number - 255
- Have to add extra column to store numbers >255