Skip to content
Cardinal Spellman High SchoolComputer Science Department
  • Study
  • Teacher tools
  • About

Cardinal Spellman High SchoolComputer Science Department

Developed by Farzin Khan Shifat

Go to the top of the page↑

Explore

  • Study
  • Teacher tools
  • My work
  • Department

Need help?

  • How studying works
  • Teacher guide
  • Request a tool
  • Report a problem

Your progress stays on this device. Vercel counts visits to public study pages, without your names, answers, files or grades. On a shared computer, use Forget my progress when you finish.

Study calculator

Drag this handle or use arrow keys to move the calculator. Home restores its position.

You can keep working on the page while this calculator is open. Closing keeps your calculations in this tab. Reloading clears them. This is Spellman’s study calculator, not a TI-84 emulator.

  1. ← All courses
  2. Computer Science
  3. Unit 5: Digital Representation and File Management

Lesson 6 of 6

Subtracting in Binary

Subtract bit patterns, follow the exchanges and check the difference

Lessons and study tools
PracticeKey wordsMy work
  1. Unit 1: Computer Hardware
    1. What Makes a Computer?
    2. Four Jobs of a Computer
    3. Data and Information
    4. CPU, RAM, and Storage
    5. Devices and Ports
    6. Choosing Hardware
    7. Hardware Review
  2. Unit 2: Computer and Internet Basics
    1. The Five Roles
    2. The Request Trip
    3. Local, Remote, and the Cloud
    4. Unit Review
  3. Unit 5: Digital Representation and File Management
    1. Only Two Choices: Bits and Switches
    2. Counting in Binary
    3. Same Bits, Different Meaning
    4. Pictures, Sound and Size
    5. Adding in Binary
    6. Current lessonSubtracting in Binary
    7. Binary Review
  1. 1Learn it
  2. 2Practice it
  3. 12343Classwork
  4. 4Finish

Step 1 of 4: Learn it

Learn it · 1 of 11Big ideas: subtract and borrowNext: Borrow Lab: follow the exchangesChoose an activity

One idea at a time. Try the example, then keep going.

Big ideas · 1 of 11

Big ideas

Big ideas: subtract and borrow

Do this: Copy each first sentence. Explain why an exchange keeps the same value.

Key words

  • Key word · Unit 5BorrowTrade 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
  • Key word · Unit 5UnsignedA 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
  • Key word · Unit 5DifferenceThe 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
  1. 1

    1. Unsigned numbers

    Unsigned binary represents whole numbers starting at zero. An Key word · Unit 5UnsignedA 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.

    4 bits00001111015
  2. 2

    2. Check the order

    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.

  3. 3

    3. Align and start

    Align equal place values, then subtract from the 1s column on the right. Keep each bit above the same Key word · Unit 5Place 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.

    84210100
  4. 4

    4. Subtract without borrowing

    Without borrowing, 0−0=0, 1−0=1 and 1−1=0. Each fact gives one Key word · Unit 5BinaryA 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.

    84211010
  5. 5

    5. Exchange, do not create

    Borrowing exchanges one unit of the next larger place for two units of the current place. To Key word · Unit 5BorrowTrade 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.

    10 − 1 = 12s1s102
  6. 6

    6. Crossing zeros

    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.

  7. 7

    7. Use changed values

    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.

  8. 8

    8. Check the difference

    Add the Key word · Unit 5DifferenceThe 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.

    1101−0101100013588 + 5 = 13

Tip: Working counts can temporarily be two. Answer bits are always 0 or 1.

Try it

Borrow Lab: follow the exchanges

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.

Choose the number of bits

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

Working count, 8s place, 11
−
Answer, 8s place, not worked yet?

4

Working count, 4s place, 00
Answer, 4s place, not worked yet?

2

Working count, 2s place, 00
Answer, 2s place, not worked yet?

1

Working count, 1s place, 00
Answer, 1s place, not worked yet?

Remember: Every exchange trades one larger unit for two adjacent smaller units without changing the total.

Worked example: no borrowing

Do this: Use the place table. Cover the answer and work from the right.

Place values
8421
1101

Subtract 1101 − 0101.

  1. Step 1: In the 1s column, subtract 1−1: write 0.
  2. Step 2: In the 2s column, subtract 0−0: write 0.
  3. Step 3: In the 4s column, subtract 1−1: write 0.
  4. Step 4: In the 8s column, subtract 1−0: write 1.

Answer: 1000.

Check: 1000 + 0101 = 1101. In decimal, 13−5=8 and 8+5=13.

Worked example: one borrow

Do this: Use the place table. Cover the answer and work from the right.

Place values
8421
0110

Subtract 0110 − 0001.

  1. Step 1: In the 1s column, notice that zero ones cannot supply one.
  2. Step 2: Exchange one two for two ones: the 2s working count becomes 0 and the 1s working count becomes 2.
  3. Step 3: In the 1s column, subtract 2−1: write 1.
  4. Step 4: In the 2s column, use its changed count, 0−0: write 0.
  5. Step 5: In the 4s column, subtract 1−0: write 1.
  6. Step 6: In the 8s column, subtract 0−0: write 0.

Answer: 0101.

Check: 0101 + 0001 = 0110. In decimal, 6−1=5 and 5+1=6.

Worked example: borrow across zeros

Do this: Use the place table. Cover the answer and work from the right.

Place values
8421
1000

Subtract 1000 − 0001.

  1. Step 1: In the 1s column, notice that zero ones cannot supply one; the 2s and 4s places are also zero.
  2. Step 2: Exchange one eight for two fours: 8s becomes 0 and 4s becomes 2.
  3. Step 3: Exchange one of those fours for two twos: 4s becomes 1 and 2s becomes 2.
  4. Step 4: Exchange one of those twos for two ones: 2s becomes 1 and 1s becomes 2.
  5. Step 5: In the 1s column, subtract 2−1: write 1.
  6. Step 6: In the 2s column, subtract 1−0: write 1.
  7. Step 7: In the 4s column, subtract 1−0: write 1.
  8. Step 8: In the 8s column, subtract 0−0: write 0.

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.

Worked example: two separate borrows

Do this: Use the place table. Cover the answer and work from the right.

Place values
1286432168421
00101101

Subtract 00101101 − 00011011.

  1. Step 1: In the 1s column, subtract 1−1: write 0.
  2. Step 2: Exchange one four for two twos: the 4s working count becomes 0 and the 2s working count becomes 2.
  3. Step 3: In the 2s column, subtract 2−1: write 1.
  4. Step 4: In the 4s column, use its changed count, 0−0: write 0.
  5. Step 5: In the 8s column, subtract 1−1: write 0.
  6. Step 6: Exchange one thirty-two for two sixteens: the 32s working count becomes 0 and the 16s working count becomes 2.
  7. Step 7: In the 16s column, subtract 2−1: write 1.
  8. Step 8: In the 32s column, use its changed count, 0−0: write 0.
  9. Step 9: In the 64s and 128s columns, subtract 0−0: write 0 in each.

Answer: 00010010.

Check: 00010010 + 00011011 = 00101101. In decimal, 45−27=18 and 18+27=45.

Worked example: no unsigned answer

Do this: Use the place table. Compare from the left first, then cover the answer.

Place values
8421
0011

Subtract 0011 − 0101.

  1. Step 1: Compare the eights bits: both are 0.
  2. Step 2: Compare the fours bits: the first has 0 and the second has 1, so the second number is larger.
  3. Step 3: Read the values: 0011 is 3 and 0101 is 5.
  4. Step 4: Subtract in integers: 3−5=−2.
  5. Step 5: Compare −2 with the four-bit unsigned range, 0 to 15: it is outside that range.

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.

Mix-up alert: borrowing gives two

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.

Mix-up alert: the lender changes

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.

Mix-up alert: a zero can pass it on

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.

Mix-up alert: order matters

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.

Step 2 of 4: Practice it

What is left (8 of 8)

Ready when you are.

Activity 1 of 8 · 0 of 8 activities done

Try it

Borrow Lab: four-bit challenge

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

Working count, 8s place, hidden until checked?
−

4

Working count, 4s place, hidden until checked?

2

Working count, 2s place, hidden until checked?

1

Working count, 1s place, hidden until checked?

Remember: Check a difference by adding back the number subtracted.

Try it

Borrow Lab: eight-bit challenge

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

Working count, 128s place, hidden until checked?
−

64

Working count, 64s place, hidden until checked?

32

Working count, 32s place, hidden until checked?

16

Working count, 16s place, hidden until checked?

Right places: start here

8

Working count, 8s place, hidden until checked?
−

4

Working count, 4s place, hidden until checked?

2

Working count, 2s place, hidden until checked?

1

Working count, 1s place, hidden until checked?

Remember: Check a difference by adding back the number subtracted.

Try it

Borrow Lab: zero chains and no unsigned answer

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

Working count, 8s place, hidden until checked?
−

4

Working count, 4s place, hidden until checked?

2

Working count, 2s place, hidden until checked?

1

Working count, 1s place, hidden until checked?

Remember: Check a difference by adding back the number subtracted.

Flashcards

Borrow and difference cards

Do this: Say the rule and give a small example before you flip.

Card 1 of 9

Subtract bit by bit

0 Know it0 Still learning

Think about the smallest possible value.

Deck options
Keyboard help

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.

Question

Which values can unsigned binary represent?

Answer

Whole numbers starting at zero. It does not represent negative numbers.

Question

What should you check before subtracting?

Answer

Whether the second number is larger. If it is, there is no unsigned answer.

Question

Which column do you subtract first?

Answer

The 1s column on the right. Align equal places first.

Question

What replaces one borrowed four?

Answer

Two twos. Both amounts have value four.

Question

What happens to a lending column?

Answer

Its working count decreases by one. Use that changed count later.

Question

How do you borrow across a zero?

Answer

Borrow from the nearest available 1 to the left, one place at a time.

Question

Can a binary answer cell contain 2?

Answer

No. Two units can appear as a working count, but a binary answer digit is 0 or 1.

Question

What is 0101−0101 in four bits?

Answer

0000. Equal numbers leave zero. Check: 0000+0101=0101 and 0+5=5.

Question

How do you check A−B=D?

Answer

Add D+B and check that it equals A. Check the decimal values too.

True or false

Check the borrowing rules

Do this: Choose True or False, then explain your choice.

Statement 1 of 6

One four can be exchanged for two twos.

Self-test

Check yourself

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

Explain the exchange

Do this: Write two or three sentences, then compare your reasoning.

Step 1 of 3: Write

A counter shows the binary pattern 1000 (eight tokens). You remove 0001 (one token). Explain how borrowing crosses the zeros, why the total value is preserved during borrowing, and how to check the difference.

Start here if it helps: I exchange one eight for...

0 words · Aim for 25 or more. This is a guide, not a limit.

Your answer is not saved anywhere. It disappears when you leave the page.

Match

Match the key words

Do this: Choose a word, then choose its meaning.

Word match round

Connect the ideas

0 / 4 connected

Choose a term, then its meaning. Or drag its grip. Use Tab and Enter or Space; Escape clears.

Terms

Meanings

Step 3 of 4: Classwork

Working on paper? Open this lesson's Classwork step and choose Paper and PDF. It gives you your own empty sheet to print.

Your work trail

  1. 1Question 1Start hereCheck your answer. Hints help you try again.
  2. 2Question 2Locked
  3. 3Question 3Locked
  4. 4Question 4Locked
  5. Your exit sentenceLockedOne thing you can do, or a question you still have.
  6. Turn in on ClassroomLockedDownload your finished work, then attach it.
Before you startQuestion 1. Show all steps
  1. 1Question 1Start hereCheck your answer. Hints help you try again.
  2. 2Question 2Locked
  3. 3Question 3Locked
  4. 4Question 4Locked
  5. Your exit sentenceLockedOne thing you can do, or a question you still have.
  6. Turn in on ClassroomLockedDownload your finished work, then attach it.

One step at a time. A hint can help you try again.

Classwork

Subtracting in Binary

Your next step

Started on another device?

Shared computer

How saving works

  • Your answers save in this browser on this device as you go.
  • Your sentence and your name are never saved in this browser. They stay only on this page until you close it, and in a PDF you download.
  • Your teacher sees nothing until you turn it in on Google Classroom. This site can't see Classroom.
  • Anyone using this browser can see saved answers. On a shared computer, use Forget when you finish.
  • Finished work stays until the end of the school year. Unfinished work stays for 30 days.

Step 4 of 4: Finish

Ready to move on?

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 classwork

Your teacher gets your work only when you turn it in on Classroom.

  • Classwork: not started yet.Start classwork

Not marked finished yet.

Next: Binary ReviewUnit 5: Digital Representation and File Management
TOPICDONE
Published with approval from Mr. Farzin Khan Shifat. Last updated November 4, 2026.
For teachers: post this lesson in Classroom

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.

  • 1234Classwork

    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.