Lesson 6 of 6
Subtract bit patterns, follow the exchanges and check the difference
One idea at a time. Try the example, then keep going.
Big ideas · 1 of 11
Big ideas
Do this: Copy each first sentence. Explain why an exchange keeps the same value.
Unsigned binary represents whole numbers starting at zero. An UnsignedA number code for zero and positive whole numbers, not negative numbers.Exactly: An unsigned binary pattern represents a nonnegative integer using powers-of-two place values. Four bits represent 0 to 15; eight bits represent 0 to 255.Mix-up alert: More unsigned bits increase the largest value but still cannot represent a negative number.See this in Key words four-bit pattern represents 0 to 15; eight bits represent 0 to 255. Neither width represents a negative number.
If the second number is larger, the subtraction has no unsigned answer. Compare equal-width patterns from the left. The first different bit decides which is larger. Extra unsigned bits cannot make a negative number.
Align equal place values, then subtract from the 1s column on the right. Keep each bit above the same Place valueWhat a digit is worth because of WHERE it sits.Exactly: In binary, the columns from right to left are worth 1, 2, 4, 8, 16, 32, 64 and 128. Each column is worth double the one to its right.Mix-up alert: A 1 in the 8s place is worth 8. A 1 in the 1s place is worth only 1.See this in Key words. Work towards the left and keep leading zeros in a fixed-width answer.
Without borrowing, 0−0=0, 1−0=1 and 1−1=0. Each fact gives one BinaryA way of writing numbers with only TWO digits: 0 and 1.Exactly: A number system where each place value is a power of two: 1, 2, 4, 8 and so on. Computers store all data in binary.Mix-up alert: 1010 in binary is ten. It is not one thousand ten.See this in Key words digit. Equal numbers leave zero in every answer place.
Borrowing exchanges one unit of the next larger place for two units of the current place. To BorrowTrade one bigger unit for two smaller units so you can subtract.Exactly: In binary subtraction, exchange one unit of the next larger place for two units of the current place, preserving the total value.Mix-up alert: Borrowing gives two units, not ten, and the lending count decreases by one.See this in Key words from the 2s place, exchange one two for two ones. The total value stays the same. A temporary working count such as 2 ones is not a binary answer digit.
When the next place is zero, borrow from the nearest available 1 to the left, one place at a time. For 1000 minus 0001, exchange an eight for two fours, then one four for two twos, then one two for two ones. Show each changed working count.
After lending, a column must use its changed working count, not its original bit. Lending one unit reduces its working count by one. Keep the original pattern visible, but subtract using the changed counts.
Add the DifferenceThe result you get when you subtract one number from another.Exactly: For A−B=D, D is the difference. Check it by adding D+B to recover A.Mix-up alert: Order matters: swapping the starting numbers usually changes the difference.See this in Key words, what subtraction leaves, to the number subtracted; the result must equal the starting number. Also convert all three values to decimal and check the subtraction. Both checks must agree.
Try it
Do this: Compare the numbers, then reveal one exchange or column at a time. Change the switches to try your own problem.
Watch 1000 minus 0001 borrow across two zeros. The original numbers stay visible above the separate working-count row. Try eight bits too.
Compare first, then start on the right. Press Enter or Space to flip a bit.
Number A: 1000 = 8
Subtract B: 0001 = 1
Rows: original A, original B, working counts, then answer bits. Working counts such as 2 are not binary digits.
8
4
2
1
Remember: Every exchange trades one larger unit for two adjacent smaller units without changing the total.
Do this: Use the place table. Cover the answer and work from the right.
| 8 | 4 | 2 | 1 |
|---|---|---|---|
| 1 | 1 | 0 | 1 |
Subtract 1101 − 0101.
Answer: 1000.
Check: 1000 + 0101 = 1101. In decimal, 13−5=8 and 8+5=13.
Do this: Use the place table. Cover the answer and work from the right.
| 8 | 4 | 2 | 1 |
|---|---|---|---|
| 0 | 1 | 1 | 0 |
Subtract 0110 − 0001.
Answer: 0101.
Check: 0101 + 0001 = 0110. In decimal, 6−1=5 and 5+1=6.
Do this: Use the place table. Cover the answer and work from the right.
| 8 | 4 | 2 | 1 |
|---|---|---|---|
| 1 | 0 | 0 | 0 |
Subtract 1000 − 0001.
Answer: 0111.
Check: 0111 + 0001 = 1000. In decimal, 8−1=7 and 7+1=8. After the exchanges, the starting amount is still 0×8+1×4+1×2+2×1=8; 2 ones is a working count, not an answer digit.
Do this: Use the place table. Cover the answer and work from the right.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 |
Subtract 00101101 − 00011011.
Answer: 00010010.
Check: 00010010 + 00011011 = 00101101. In decimal, 45−27=18 and 18+27=45.
Do this: Use the place table. Compare from the left first, then cover the answer.
| 8 | 4 | 2 | 1 |
|---|---|---|---|
| 0 | 0 | 1 | 1 |
Subtract 0011 − 0101.
Answer: no unsigned answer.
Check: In integers, −2+5=3 and 3−5=−2. Do not invent a leading 1 to borrow from or write 1110: unsigned 1110 is 14, and 14+5=19, not 3.
Do this: Name the wrong idea, then explain the fix.
Wrong idea: Borrowing gives this column ten. Borrowing gives two units because the next binary place is worth twice as much. One two becomes two ones, not ten ones.
Do this: Name the wrong idea, then explain the fix.
Wrong idea: The column that lends keeps its original 1. Lending reduces that working count by one. Use the changed count when you reach that column, not the original bit.
Do this: Name the wrong idea, then explain the fix.
Wrong idea: A zero stops borrowing. Borrow from an available 1 farther left, exchanging through each place in between. A zero receives two units and passes one on as two smaller units.
Do this: Name the wrong idea, then explain the fix.
Wrong idea: Swap the numbers, or wrap the answer, when the second is larger. A negative difference has no unsigned answer. Swapping answers a different question. For 0011−0101, neither 0010 nor unsigned 1110 works: 2+5 is 7 and 14+5 is 19, not 3.
Ready when you are.
Activity 1 of 8 · 0 of 8 activities done
Try it
Do this: Set the difference bits or choose No unsigned answer, then check.
Compare first. The opening rounds include no borrow, one borrow, zeros, equal numbers and a larger second number.
Compare first, then start on the right. Press Enter or Space to flip a bit.
Subtraction 1 of 5. Keep every answer place, including leading zeros.
Number A: 1101 = 13
Subtract B: 0101 = 5
Rows: original A, original B, working counts, then answer bits. Working counts such as 2 are not binary digits.
8
4
2
1
Remember: Check a difference by adding back the number subtracted.
Try it
Do this: Set the difference bits or choose No unsigned answer, then check.
Keep all eight places. The same exchanges work across a whole byte. The first five rounds cover the same five cases.
Compare first, then start on the right. Press Enter or Space to flip a bit.
Subtraction 1 of 5. Keep every answer place, including leading zeros.
Number A: 11001101 = 205
Subtract B: 01000101 = 69
Rows: original A, original B, working counts, then answer bits. Working counts such as 2 are not binary digits.
Left places
128
64
32
16
Right places: start here
8
4
2
1
Remember: Check a difference by adding back the number subtracted.
Try it
Do this: Set the difference bits or choose No unsigned answer, then check.
Do not swap the operands. Decide whether an unsigned answer exists before borrowing across zeros. Later rounds mix all cases.
Compare first, then start on the right. Press Enter or Space to flip a bit.
Subtraction 1 of 4. Keep every answer place, including leading zeros.
Number A: 1000 = 8
Subtract B: 0001 = 1
Rows: original A, original B, working counts, then answer bits. Working counts such as 2 are not binary digits.
8
4
2
1
Remember: Check a difference by adding back the number subtracted.
Flashcards
Do this: Say the rule and give a small example before you flip.
Card 1 of 9
0 Know it0 Still learning
Think about the smallest possible value.
On the card: Enter or Space flips. Left and Right move. After revealing, 1 marks Still learning and 2 marks Know it. Tab reaches every control.
Which values can unsigned binary represent?
Whole numbers starting at zero. It does not represent negative numbers.
What should you check before subtracting?
Whether the second number is larger. If it is, there is no unsigned answer.
Which column do you subtract first?
The 1s column on the right. Align equal places first.
What replaces one borrowed four?
Two twos. Both amounts have value four.
What happens to a lending column?
Its working count decreases by one. Use that changed count later.
How do you borrow across a zero?
Borrow from the nearest available 1 to the left, one place at a time.
Can a binary answer cell contain 2?
No. Two units can appear as a working count, but a binary answer digit is 0 or 1.
What is 0101−0101 in four bits?
0000. Equal numbers leave zero. Check: 0000+0101=0101 and 0+5=5.
How do you check A−B=D?
Add D+B and check that it equals A. Check the decimal values too.
True or false
Do this: Choose True or False, then explain your choice.
Self-test
Do this: Answer all eight questions. Read each explanation before moving on.
8 questions. One at a time.
Practice, not a grade. No timer. Your best score stays in this browser.
Write it
Do this: Write two or three sentences, then compare your reasoning.
Start here if it helps: I exchange one eight for...
Your answer is not saved anywhere. It disappears when you leave the page.
Match
Do this: Choose a word, then choose its meaning.
Connect the ideas
0 / 4 connectedChoose a term, then its meaning. Or drag its grip. Use Tab and Enter or Space; Escape clears.
Classwork
Your next step
Started on another device?
Practice it: You did 0 of 8 activities.
You decide when you have finished. This is your study progress, not a grade.
Before you move on
Your teacher gets your work only when you turn it in on Classroom.
Not marked finished yet.
One ready post. Nothing is saved or sent. Make one Classroom assignment for each step you assign, using the points shown below and its own due date. Copy its post and paste it into the assignment's instructions.
Classwork
Worth 10 points.
https://gradebridge-beryl.vercel.app/learn/csc/digital-representation-and-files/subtracting-binary#classwork
After students turn it in, open Check student work
Download their files from the assignment's Drive folder, then open them in Check student work.