Home
Subjects
Textbook solutions
Create
Study sets, textbooks, questions
Log in
Sign up
Upgrade to remove ads
Only $35.99/year
Binary 2
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
Terms in this set (23)
What are the rules for unsigned binary addition?
1 + 0 = 1
0 + 1 = 1
0 + 0 = 0
1 + 1 = 10
What happens if the addition results in 6 bits but the computer system uses 5 bits?
5 bits to 6 bit: some computer systems will not accept using numbers above a certain number of bits e.g. a 5-bit system would discard the first bit on the left & store the number 01010 ← called overflow
What is overflow?
result of a computation is to large to be stored in the format for numbers
What happens if some computers detect an overflow?
Some computers would notice an overflow has occurred & implement an overflow bit- detects whether 6th bit is non 0 & halts arithmetic & alerts that the addition can't be done (in the constraints of the computer system)
What would other computers try to do with an overflow?
Some computers would try to store the result- may result in the breakdown of a computer system
What are the rules for unsigned binary subtraction?
0 - 0 = 0
1 - 0 = 1
1 - 1 = 0
0 - 1 = borrow (as can't store negative values)
When can you not perform an unsigned binary subtraction?
no value to borrow = can't perform subtraction as negative result
What are the steps for unsigned binary multiplication?
1. Select the number with the smaller number of 1s
2. Split the number into parts
3. Multiply each part to the number with the greater number of 1s (bit-shifting)
4. Sum the resulting products
How do you do unsigned binary division?
Binary long division is similar to decimal long division
What are the steps for signed-magnitude binary addition if the signs are the same?
If the signs are the same:
1. Add the magnitudes to get the magnitude of the result
2. The signed bit is the same as the 2 operands
What are the steps for signed-magnitude binary addition if the signs are not the same?
1. Which operand has the smaller magnitude
2. Subtract the smaller magnitude from the larger magnitude
3. Use the sign of the operand with the larger magnitude
When is there overflow for signed magnitude?
When there is overflow into the signed bit
How do you do signed-magnitude subtraction?
Rearrange subtraction to an addition —> a - b = a + (-b)
Flip the sign of the number
How do you do signed-magnitude multiplication/division?
1. Multiply or divide magnitudes as unsigned binary
2. same sign = result has a positive sign, different signs =. result has a negative sign
How is complement arithmetic different?
Don't need any specialised logic to determine whether a result is positive or negative.
Sets found in the same folder
Essentials of Computer Systems
48 terms
Binary 1
33 terms
Binary 3
42 terms
Assembly 1
67 terms
Other sets by this creator
9 Making the most of models
14 terms
8 Agile Software Development
84 terms
10 Sorting Algorithms
21 terms
9 Search Tree Structures
10 terms