Binary numbers and Integer Representation Flashcards

1
Q

An n-bit register can hold how many bit patterns?

A

2^n

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

Range of unsigned integers

A

0 - 2^(n-1)

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

Range of signed integers

A

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

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

Steps to negate a number

A
  1. take the one’s complement
  2. Add 1 to the result
    (Also works to negate a negative number)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the one’s complement?

A

Toggle all 0’s to 1, and vice versa

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

Octal numbers

A

Base 8
numbers 0-7
Each digit corresponds to a 3-bit pattern

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