# Represent unsigned 12-bit octal numbers. Results in octal

I have an HW question where I found an answer that matches mine, but their breakdown confuses me.

Ques: What is 4365 - 3412 when these values represent unsigned 12-bit octal numbers? The result should be written in octal. I used binary and then looked up the Octal to obtain 753

Found solution: 4365-3412 = 0753 This is because 5-2 = 3 (makes sense), 6-1 = 5 (yep), 8+3-4=7 #we need a carry here, since 3<4 and 4-4=0

I can see where they got 8 (I think) 3+5=8, but why did they do that and how are we getting a carry for the ending of 4-4=0. Appreciate any help/reference.

• where they got 8 since your base is 8, you have $43_8 = 4 \cdot 8 + 3 = 3 \cdot 8 + (3 + 8)$). I mean, it's the same thing as in base 10: e.g. when computing $53 - 34$, for the last digit you'll compute $10 + 3 - 4 = 9$, and for the first digit: $(5 - 1) - 3 = 1$. How are we getting a carry for the ending of 4-4=0 - it should be $(4-1)-3=3-3=0$.
– user114966
Apr 16 at 21:09
• (3+5=8 did you start adding result digits? Do you do that using a different representation, say, decimal?) Apr 17 at 6:41
• In this context it's called borrow, not carry. Apr 19 at 6:21
• They are using the usual subtraction algorithm. I assume that you know how to subtract numbers in decimal. It is precisely the same algorithm, only in a different base. Apr 19 at 6:21