SLR13 Flashcards

1
Q

What are the 5 data types

A
  1. Integer
  2. Boolean
  3. Character
  4. String
  5. Floating point / real
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Give an example of each data type

A
  1. Integer = 1
  2. Boolean = True / False
  3. Character = A
  4. String = “Hello world!”
  5. Floating point / real = 1.15
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the process of casting data types

A

Automatically converting one data type into another

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

What does MSB stand for

A

Most Significant Bit

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

With positive numbers what is generally the MSB

A

128

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

In sign and magnitude what is the MSB

A

+ / -
+ = 0
- = 1

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

In twos compliment what is the MSB

A

-128

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

Can two’s complement store a wider range of numbers than sign and magnitude

A

Yes

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

What happens when you add these binary numbers together:
0 + 0
0 + 1
1 + 0
1 + 1

A

0
1
1
0 with a 1 carried to the next layer

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

What happens when you add these binary numbers together with a carried 1 before it:
0 + 0 (+ 1)
0 + 1 (+ 1)
1 + 0 (+ 1)
1 + 1 (+ 1)

A

1
0 with a 1 carried to the next layer
0 with a 1 carried to the next layer
1 with a 1 carried to the next layer

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

How does a computer work out subtraction

A

Turns the number that it’s going to subtract into a negative number then adds these two numbers together

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

How are fractions done with binary and what are they referred to as

A

A mantissa and exponent
Floating point numbers

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

What is the mantissa

A

The actual data the number itself is stored in

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

What is the exponent

A

The exponent stores the offset for the floating point in the mantissa

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

How are characters stored in a computers memory

A

With character sets, this is where every character has a unique code. Every device uses the same character set so that one letter matches another letter on a different device when sharing data

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

What are the two types of character set

A

UNICODE
ASCII

17
Q

Which character set stores more characters, UNICODE or ASCII and why

A

UNICODE because it is stored in 24-bit code but as this is unreliable it is stored with a 6-bit hex value. Allowing for over 16,000,000 characters.
While ASCII was stored in a 7-bit code allowing for 128 characters but then later changed to 8-bit code allowing for 256 characters

18
Q

What are the 4 other operations of the ALU

A
  1. Masking
  2. ANDing
  3. ORing
  4. XORing
19
Q

What is masking

A

Isolating and extracting specific bit values in a sequence, allowing them to be changed and toggled

20
Q

What is ANDing

A

Requires both inputted values to be a 1 in order to result in a 1

21
Q

What is ORing

A

Requires either of the inputted values to be a 1 in order to output a 1

22
Q

What is XORing

A

Requires either of the inputted values to be a 1 but not both in order to output a 1