Data Flashcards

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

What is the ASCII number for a? A?

A

a: 97 (0110 0001)
A: 65 (0100 0001)

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

What is the ASCII number for 0?

A

48 (0011 0000)

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

What is the ASCII code for backspace?

A

0000 1000

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

What is the range of values represented by 1s complement signed binary?

A

-(2^(n-1))+1 to (2^(n-1))-1

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

What is the range of values represented by 2s complement signed binary?

A

-(2^(n-1)) to (2^(n-1))-1

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

Why might we use 1s complement instead of 2s?

A

It can represent negative zero. This can be useful in computing when representing very small numbers, so we can tell if it is a number approaching zero from above or below (a rounded negative or a rounded positive)

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

Describe how to represent a negative number using 2s complement:

A

Write the number as a positive with an extra zero on the left.
Flip the bits (1s to 0s, 0s to 1s).
Add one.

Positive numbers start with a 0, negatives start with 1.
You can check your number by taking the negative value of the leftmost 1 and adding all of the values of the following 1s - it will be your number.

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