1.4.1 Data Types Flashcards

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

1.4.1 A)
What is the need for data types

A

Data stores in binary stored in right data type so right operations can be preformed

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

5 data types with brief expiation

A

Integer - whole number
real / float - decimal point number
character- single symbol
string - collection of character
Boolean - True or False

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

1.4.1 B)
Whats a single binary digit called
8 bits
4 bits

A

bit
1 byte
1 nibble

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

Bases for binary, decimal , hexadecimal

A

2 , 10 ,16

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

1.4.1 C)
What is sign and magnitude

A

Leading 1 = negative
Leading 0 = positive
Example binary 173 10101101
sign and magnitude +173 010101101
sign and magnitude -173 110101101

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

Twos complement

A

flip +1

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

1.4.1 D)
adding and subtracting

A

0 + 0 = 0
1 + 0 = 1
1 + 1 = 10
1 + 1 + 1 = 11

1 = 2 on coluemm to the right

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

1.4.1 E/F)
Hexadecimal conversion

A

Hex 0-9 = 0-9
10-15 = A-F
base 16
split into digit convert hex into dec
convert dec > binary
combine nibbles

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

1.4.1 g)
normalisation

A

must start with 10 or 01 (shift the exponents and mantissa )

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

floating point

A

exponent use two complement move decimal point + right - left decimal starts between 1st and 2nd digit in mantissa

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

(h) Floating point arithmetic, positive and negative
numbers, addition and subtraction.

A

Too add fp exponent must be the same must normalize

too sub make exponent same (mantissa twos complement > add > normalise

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

(i) Bitwise manipulation and masks: shifts, combining
with AND, OR, and XOR.

A

Shift right n =2^n increase
Shift left n =-2^n increase

masks can be applied to binary number combined with logic gated
AND 1 + 1 = 1 , 0 + 1 = 0 , 0 + 0 = 0
OR 1 + 1 = 1 , 0 + 1 = 1 , 0 + 0 = 0
XOR 1 + 1 = 0 , 1+0 = 1 , 0 + 0 = 0

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

j) How character sets (ASCII and UNICODE) are used
to represent text

A

ASCII 7 bits 128 diff char A-Z 65-90 , a-z 97-122
ASCII cant represnt diff languages

unicode solved this problem using varying number of bits allowing over 1m diff char

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