Encodings Flashcards

1
Q

In general, a sequence or group of k bits can represent one of ______ distinct k-bit patterns

A

2k

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

In order for groups of bits to have an meaning (aka store data), what needs to happen?

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

As notation, when there is a sequence of bits, the highest and lowest order bits are called _________?

A

Highest order bit = most significant bit (msb)

Lowest order bit = least significant bit

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

178

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

What are the two ways to perform this encode?

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

In general, how does unisigned integer arithmetic work?

A

that last bit goes into the condition code register, which tells you about this lost bit; overflow

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

What are the 3 different encoding methods for signed numbers?

A
  1. Sign magnitude representation
  2. 1’s complement representation
  3. 2’s complement representation

Modern day computers use 2’s complement representation for signed numbers

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

In general, what is Sign Magnitude Representation?

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

In general, how does One’s complement representation work?

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

Using One’s compliment

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

In general, What is two’s complement representation?

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

What are some of the advantages of Two’s Completement Representation?

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

Using Two’s Complement in general, how do we convert Binary to Decimal?

A
18
Q

Conver the following Two’s Complement encoded number into decimal (base 10)

A
19
Q
A
20
Q
A
21
Q

In general, how do you convert Decimal to a Binary Two’s Complement representation?

A
22
Q
A
23
Q
A
24
Q

Where are arithmetic and logic operations typically implemented?

A

In the Arithmetic Logic Unit (ALU)

25
Q

In general, hows does two’s complement representaton for Addition work?

A
26
Q

In general how does Two’s Complement Representation work for Subraction

A
27
Q
A
28
Q
A
29
Q

In general, what is sign extension?

We have a number in 4 bits, the number -1 represented by 11112 convert to an 8 bit number.

A

example, using 4 bits, the number -1 is represented by 11112. If we just pad it with 4 zeros, this becomes the 8 bits 000011112. However, this is not the encoding for -1 using 8 bits (the correct encoding is 111111112)

The correct thing to do is to replicate the msb. This is known as sign extension.

For example, using 4 bits, the number -1 is represented by 11112. If we replicate the msb bit with 4 times, this becomes the 8 bits 111111112, which is the 8 bit encoding for

-1

30
Q

What is Overflow/Underflow?

A
31
Q

What is the way to test for overflow/underflow?

A
32
Q
A
33
Q

In general, how can any decimal with a fixed number of digits be represented using a sum of (negative owers of 2s)?

A
34
Q

What is the technique for finding the binary representation for a decimal point number D

A
35
Q
A
36
Q
A
37
Q
A
38
Q
A
39
Q

In general, how does IEEE floating point representation work?

A
40
Q
A
41
Q

What are the special properties of Single-Precision encoding?

A
42
Q

In general how are Characters and Strings encoded?

A