Chap 2 - Part 2 - Cont'd Flashcards
Define:
Binary Digit
Also known as binary bit
- One of the two numbers in base 2, 0 or 1, that are the components of information
Define:
Least significant bit
The rightmost bit in a MIPS word
Define:
Most significant bit
The leftmost bit in a MIPS word
Define:
Instruction format
This is a form of representation of an instruction composed of fields of binary numbers
Define:
Machine language
This is the binary representation used for communication within a computer system
Define and explain:
Unsigned Binary Integers
- An unsigned binary integer: is a fixed-point system with no fractional digits
- Unsigned binary integers are positive number systems, usually with a modulus, which is a power of 2
- Ex.
- a 4-bit unsigned binary number has values ranging from:
- (00002)(010) to 11112 (1510)
- a 4-bit unsigned binary number has values ranging from:
Modern computers support binary integers of 8, 16, 32, or 64 bits
the largest value in any unsigned binary integer system is:
- one containing all 1’s, similarly, just as the largest decimal number is the one containing all 9’s.
- largest modulo - 100010 = 99910
- Largest modulo - 10002 = 1112
What is the largest value possible in N bits for unsigned binary integers?
largest value possible in N bits is:
2N -1
Image;
Explain:
One’s complement
This is a notation that represents:
- The most negative value by 10…0002 and…
- the most positive value by 01…. 112
This notation leaves an equal number of negatives and positives but ends up with two zeroes
The term is also used to mean the Inversion of every bit in a pattern:
0 to 1 and 1 to 0
Negation shortcut:
Explain this concept
This is also known as:
Bitflipping
Suppose we want to come up with the 1’s complement representation for the number -2 in base 10…
- start by converting 210 to base 2:
- 210 = 00102
- flip all the bits == 1101
- And, add 1, therefore == 1110
OR
Another shortcut of bitflipping is:
you may flip all the bits to the left of the least significant set bit…
- eg.
- 210 = 00102 = 1110 [done!]
Explain the concept of:
2s- complement signed integers
Given an N-bit number…
we can let its range be:
- -2n-1 to + 2n-1 - 1
So, using 32 bits yield the range:
Image:
Example of:
2s-Complement signed integers
Explain:
Signed Negation
Complement and add 1:
- Complement means 1 > 0, 0 > 1
- ex
- Image:
About Sign Extension Concept
Image:
About Hexadecimal concept
Image:
Signed Vs. Unsigned
Image: