1.4.1 - Data types Flashcards

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

How do you convert denary to binary?

A

Write base 2 columns right to left - up to the maximum possible value before the base number is larger than the denary number.
EG if number was 74 write 1 2 4 8 16 32 64 - 64 is the minimum value as 128 (the next column value) is larger than 74.
Select the numbers that add up to 74 - chooswe the largest possible number each time.

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

How do you convert a binary number to a hexidecimal number?

A

Split the binary number into groups of 4 bits.
Assign each group a value of 0-9:A-F.
Combine the results.

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

How do you convert hex to binary?

A

Seperate each digit. Each digit represents a group of 4 bits. Convert the digits into 4 bit groups.
Combine to get binary result.

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

How do you convert hex to denary?

A

The column base now represents 16s and the next value is 16 times the previous (1….16….256)
Times the hex value by the coressponding column base value and add the results together for the denary number.

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

How do you convert denary to hex?

A

First convert denary to binary

Then convert binary to hex

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

Explain M x B^N

A
M = Mantissa or Coefficient 
N = Exponent or order of magnitude 
B = Number Base
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does a negative exponent affect a calculation in comparison to a positive?

A

Positive moves the decimal point to the right

Negative moves the decimal point to the left

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

How do you convert a positive floating point number with a positive exponent into denary?

A
  1. Write down the mantissa
  2. Translate the exponent from binary to denary (N)
  3. Move the decimal point (N) places to the right (As the exponent is positive)
  4. Convert binary number to denary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you convert a positive floating point number using a negative exponent into denary?

A
  1. Write down the mantissa
  2. Find the twos compliment of the exponent (Read number from right to left - start flipping digits after the first 1) = (N)
  3. Move the decimal point (N) places to the left (As the exponent is negative)
  4. Convert binary number into denary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you convert a negative floating point number using a positive exponent into denary?

A
  1. Find the twos compliment of the mantissa (Read number from right to left - start flipping digits after the first 1)
  2. Translate the exponent from binary to denary = (N)
  3. Move the decimal point (N) places to the right (As the exponent is positive)
  4. Convert binary number to denary (Remember denary will be negative)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you normalise a positive binary number?

A

A positive number has a sign bit of 0 and the next bit is always a 1

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

How do you normalise a negative binary number?

A

A negative number has a sign bit of 1 and the next bit is always a 0.

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

Normalise 0.0001011 0101 held in an 8 bit mantissa and a 4-bit exponent

A
  1. The binary point needs to move 3 places to the right so that there is a 1 following the binary point.
  2. Making the mantissa larger means we must compensate by making the exponent smaller, so subtract the number of time the deciaml point moved from the exponent. In this case the exponent will now be 0010.
  3. The nomrlaised number is 0.1011000 0010
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Normalise 1.1110111 0001 held in an 8-bit mantisaa and a 4-bit exponent.

A
  1. The binary point needs to move 3 places to the right so that there is a 0 following the binary point.
  2. Making the mantissa larger means we must compensate by making the exponent smaller, so subtract the number of time the deciaml point moved from the exponent. In this case the exponent will now be 1 - 3 = 1110 (-2)
  3. The normalised number is 1.0111000 1110.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you convert a positive denary number to a normalised floating point binary number?

A
  1. Convert the number into fixed point binary.
  2. Move the decimal point in front of the first 1.
  3. The mantissa is now equal to this new number. (Fill in the rest of the bits on the end with 0s if you have to make up 8-bits)
  4. The exponent is now equal to the amount of places you moved the decimal point.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you convert a negative denary number to a normalised floating point binary number?

A
  1. Convert denary to fixed point decimal
  2. Convert fixed point decimal to twos compliment version.
  3. Move the decimal point in front of the first 0.
  4. The mantissa is now equal to this new number. (Fill in the rest of the bits on the end with 0s if you have to make up 8-bits)
  5. The exponent is now equal to the amount of places you moved the decimal point.
17
Q

When converting denary to a normalised floating point number, which direction in the movements
of the decimal point results in a positive and negative exponent?

A
Left = positive 
Right = negative
18
Q

When converting a normalised floating point number to denary, how does the state of the exponent affect the movement of the decimal point?

A
Positive = Right 
Negative = Left
19
Q

What is ASCII?

A

American standard code for infortmation interchange - ASCII was, historically, the standard code for representing characters on a keyboard using binary values.
This Standard uses 7 bit values which form a total of 128 different bit combinations.
0-32 represent non printed characters used for control such as backspace

20
Q

Problems with ASCII

A

Numbers are represented as symbols rather than values in the code - for example the number 7 is represneted by 011 0111 - which in binary is equal to 55.
This means 7 + 7 would equal 77 in ASCII as numbers arent equal to a value.
This makes arithmetic pointless in ASCII.

21
Q

What is unicode and why was it created?

A

A 16-bit standardised code. Allowing for 65,536 combinations and could therefore represent alphabets from dozens of languages.
The first 128 codes were the same as ASCII so compatability was achieved.

UTF-32 (32-bit) version was developed to include just over a million characters.

Unicode was created to act as a standardised universal code on a global scale. This is because by the 1980s too many coding systems had been developed accross the world that were incompatible with each other.