Chapter 1: Data Representation Flashcards

1
Q

How and why computers use binary to represent data

A

the binary number system is chosen because because it only consists of ones and zeros

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is binary

A

Binary is a bunch of ones and zeros effectively switches which have two positions : on and off

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to convert to binary to denary

A

Each time one value appears in a binary number column e.g 128 64 32 16 8 4 2 1. The column value is added to a total.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

converting denary to binary

A

Subtraction of power of two e.g. 142 - 128 = 14
14 - 8 = 6
6 - 4 = 2
2 - 2 = 0

1 0 0 0 1 1 1 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why is hexadecimal number system used?

A

Easier for humans to remember and work with, since a hex digit represent four binary digits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Examples of using hexadecimal system

A
  • Error codes
  • Media Access Control (MAC) Addresses
  • Internet Protocol (IP) Address
  • HTML colour codes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to add two positive 8 bit numbers

A

Carry and sum method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are logical binary shifts on positive 8-bit integers?

A

The logical shift means moving the binary number to the left or to the right.

  • Each shift left is equivalent to multiplying the binary number by 2.
  • Each shift right is equivalent to dividing the binary number by 2.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is two’s complement?

A

A way of representing negative integers in binary.

A 1-value in the left-most bit (ie. -128) indicates a negative number and a 0-value in the leftmost bit indicates a positive number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Convert kilobyte, megabyte, gigabyte, terabyte and petabyte to bits

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

1 GB is equal to ………. MB

A

1024 MB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what are the uses of binary

A

Used to represent transistor states in computers

used to represent numbers in digital displays

used in CPU registers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

file formats examples

A

MIDI(music)

JPEG(image)

MP3(Sound)

MP4(video)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Lossy vs lossless

A

lossless- restores and rebuilds file data in its original form

Lossy - the file has been slightly compressed which saves space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Parity check

A

even parity - must be an even amount of ones

odd parity - must be an odd amount of ones

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the purpose of compression?

A

Make data smaller, reduce file size

17
Q

Give examples of a lossy compressed file

A

mp4, mp3, jpeg

18
Q

Give examples of a lossless compressed file

A

MIDI, WAV, ZIP

19
Q

Name 1 advantage and 1 disadvantage of using Unicode compared to ASCII

A

Advantage - represent more characters and non-Western languages

Disadvantage - takes up more space (up to 4 bytes) than ASCII (1 byte)