1.4.1 Data Types Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Convert this binary to denary in two’s complement: 01000011

A

67

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

Convert this binary to denary in two’s complement: 10111100

A

-68

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

Convert this denary to binary in two’s complement: -47

A

1101 0000

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

Convert this denary to binary in two’s complement: 86

A

0101 0110

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

How many available values are there for each digit in hexadecimal?

A

16

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

Convert the unsigned binary number 11110000 to hexadecimal

A

F0

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

Common Data Types (5)

A

Character. Real (float). Integer. Boolean. String.

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

What is a pointer? (2)

A

A pointer is a built-in data type in some low-level languages. It will hold the address of a value or object located in computer memory.

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

Memory requirements of each data type (5)

A

Character (4 bytes), String (4 bytes for each character), Boolean (1 bit), Integer (4 bytes), Real (4 bytes).

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

What are the rules of binary addition?

A

0+0=0. 1+0=1. 0+1=1. 1+1=0 and carry 1. 1+1+1=1 and carry 1.

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

How do we represent signed binary integers?

A

The most significant bit becomes a sign digit. 0 represents positive. 1 represents negative.

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

How do we represent binary integers in two’s complement?

A

The most significant bit becomes the neative of that number.

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

How do you add 2 floating point numbers? [3]

A
  1. Normalise both numbers 2. Equalise the exponents by increasing the smaller one to match the larger one 3. Add the mantissas
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you subtract 2 floating point numbers? [5]

A
  1. Normalise both numbers 2. Equalise the exponents by increasing the smaller one to match the larger one 3. Find the two’s complement negative value of second number 4. Subtract by adding the two mantissas 5. Normalise the result
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What happens during a left shift? [3]

A

All the bits in the number are shifted to the left by a specified number of places [1] For every 1-bit shift: The most significant bit is discarded [1] A 0 is put into the empty space on the right [1]

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

What happens during a right shift? [3]

A

All the bits in the number are shifted to the right by a specified number of places [1] For every 1-bit shift: The least significant bit is discarded [1] A 0 is put into the empty space on the right [1]

17
Q

Why can’t logical shifts be applied to signed numbers? [1]

A

The sign bit must not be shifted [1]

18
Q

What is a 1-bit left shift equivalent to? [1]

A

Multiplying by 2 [1]

19
Q

What is a 1-bit right shift equivalent to? [1]

A

Dividing by 2 [1]

20
Q

What is the difference between an arithmetic and logical shift? [1]

A

The most significant bit is not shifted during an arithmetic shift [1]

21
Q

In what case of an arithmetic shift are the empty places padded with a 1? [1]

A

Right shift of a negative number [1]

22
Q

What is a cyclical shift? [1]

A

A shift where the discarded space is placed into the empty space on the other side of the number [1]

23
Q

Denary to Binary [1]

A

Divide number by 2, account for result and remainder. Repeat until 0. [1]

24
Q

Binary to Hexadecimal [1]

A

Convert each group of 4 bits into 1 denary digit [1]

25
Q

Hexadecimal into Binary [1]

A

Convert each digit into denary and convert into 4 bits [1]