Chapter 2: Number Systems, Sign Representations, and Two's Complement Flashcards
What does “bit” stand for?
Binary Digit
How many values can a bit have?
2 possible values (0 and 1)
What does a byte consist of?
8 bits
With n bits, how many possible values are there?
2^n possible values
1 K values is how many bits? Possible values?
2^10 values (10 bits) = 1024 values
1 Mega values is how many bits? Possible values?
2^20 (20 bits) = 1,048,576 values
1 Giga values is how many bits? Possible values?
2^30 (30 bits) = 1,073,741,824 values
What does ASCII stand for?
American Standard Code for Information Interchange
ASCII is how many bits and values?
7 bits, 128 values
What is the Positional Notation System?
(Number at Index) x (Base)^Index
Can every possible integer value be converted from one base to another?
Yes
Can every possible fractional value be converted from one base to another?
No
Describe binary multiplication
Choose one number as the multiplier and one as the multiplicand, for each digit in the multiplier, start from the rightmost digit, and write it top-down, shifting one left each time until all are done, then add (check notes for picture)
What is range?
the variation between the smallest and largest possible values
What is precision?
how well a number can be represented (how many significant digits)
What is accuracy?
the difference between a representation and its actual value
For Sign and Magnitude Representation, what does the leading bit represent?
Positive (0) or negative (1)
For Sign and Magnitude Representation, how many representations of 0 are there?
2
For Sign and Magnitude Representation, what is the range?
-2^(n-1) – 1 to 2^(n-1) – 1
For Biased Representation, what is Excess-K?
shifting/adding the values by a certain number
How do you get the original number using Biased Representation?
Subtract the excess
How do you find the two’s complement of a binary number?
copy all zeros from the right until a one is reached, keep the one, flip all remaining bits
For the Time example of Two’s complement, how do you find the two’s complement of a number?
the two’s complement of any number is 24 – (the number)
What are the three important properties of Two’s Complement numbers?
- One unique zero
- Most-significant bit is the sign bit
- Range: -(2^n-1) to (2^n-1) – 1
When will arithmetic overflow never occur?
When adding a positive number to a negative number
How can you tell arithmetic overflow has occurred?
When the carry-in bit does not equal the carry-out bit after the addition has been completed
Shifting to the right means
Dividing by 2
Shifting to the left means
Multiplying by 2
Write out the hexadecimal base system and the corresponding binary values
A
Write out the octal base system and the corresponding binary values
A
Write out the ranges of the following systems and the numbers of zeros they have: 2’s complement, signed-magnitude, Unsigned
- Unsigned (1 zero) : 0 to 2^(n) – 1
- Signed and Magnitude (2 zero) : -2^(n-1) – 1 to 2^(n-1) – 1
- 2’s Complement (1 zero) : -2^(n-1) to 2^(n-1) – 1
Write out the possible values from 1 bit to 9 bits
A