Primitive data types, binary, and hexadecimal Flashcards

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

Another name for float

A

real

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

How do you convert from binary to hexadecimal?

A

You split the binary number into groups of four starting from the right, and you then convert each group into the corresponding hexadecimal number. For example the binary number 1010 0101 would be:
1010 = 2+8=A
0101 =1+4=5
thus, 1010 0101 = A5

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

How do you convert from hexadecimal to binary?

A

You convert into denary form first and then convert the following denary number into binary form.

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

What’s a byte?

A

A byte is set of 8 bits made up of 0s and 1s that holds one character of text.

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

The ASCII is made up of how many bits?

A

7 bits commands or characters in the original version but 8 in the second version

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

How many bits combination does theASCII uses?

A

128 or 256 in the second version

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

UTF-16 vs UTF-32 Unicode

A

One uses commands and characters that are represented by using 16 bits, while the other 32.
Both are compatible with ASCII’s commands and characters, and enabled more characters from other languages to be used such as greek and chinese.

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

When subtracting 2 denary numbers to then convert the answer into binary form what are the steps involved?

A

Take the positive denary number and convert into a signed binary number.
The next number will be converted into its postive version, and then by switching the bits and adding 1, you are converting into a negative signed binary number.
Add the 2 numbers, and check for any overflow error caused by a carrier bit.

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

Define Normaniisation

A

The process of moving the binary point in order to provide the maximum level of precision for a given number of bits.

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

Define underflow

A

When a number is too small to be represented in the allocated number of bits, so when divided by a number greater than 1 the answer may be represented by 0.

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

What does a logical right shift do?

A

causes the least significant bit to be shifted into the carry bit, and a 0 moves into the most significant bit to occupy the vacated space.

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

What does a logical left shift do?

A

causes the most significant bit to be shifted into the carry bit, and a 0 moves into the least significant bit to occupy the vacated space.

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

What does a left arithmetic shift does ?

A

It has the effect of multiplying by 2. It bypasses the sign bit and shifts the most significant bit into the carry bit, and the carry bit into the least significant bit.

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

What does a right arithmetic shift does?

A

It has the effect of dividing by 2. It takes in account the sign bit and shifts that binary number into the most significant bit, while the least significant bit is shifted into the carry bit.

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

What does a rotate/circular right shift does?

A

The value in the least is shifted into the carry bit, and the carry bit is shifted into the most significant bit.

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

What do 1s and 0s represent to logical instructions

A

True and False

17
Q

What are the 4 logical instructions

A

AND
XOR
OR
NOT

18
Q

Describe the function and effect of AND operation

A

If both inputs are equal, then returns true

19
Q

Describe the function and effect of OR operation

A

If one or both inputs are equal, then returns true

20
Q

Describe the function and effect of NOT operation

A

If value is false, returns true

21
Q

Describe the function and effect of XOR operation

A

If one of the inputs is true both not both, returns true

22
Q

What is a character set?

A

A character set is a published collection of codes and corresponding characters which can be used by computers for representing text.

23
Q

Two widely used character sets are…

A

ASCII and Unicode.

24
Q

What does ASCII stands for?

A

Stands for American Standard Code for Information Interchange

25
Q

ASCII uses…

A

7 bits to represent 2^7=128 different characters

The capital letters A-Z are represented by codes 65-90 while the lower case letters a-z correspond to codes 97-122. There are also codes for numbers and symbols