Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

a question about base 3 subtruction..

Status
Not open for further replies.
i cant understand how it works:
i have two bit numbers (x1 x0 ,y1 y0) which are needed to be subtruction

i cant understand why
x1 x0 y1 y0 | B D1 D2
0 0 0 1 | 1 1 0
0 0 1 0 | 1 0 1
0 0 1 1 | X X X


i cant understand these arithmetics
the first one is 0-1=-1
so in base 3 the resolt is should be three but i cant understand what meen Borrow=1
and the resolt 10
i dont understand how did they desided that

and why we have dont cares on the third example
 
First, this is base 2 arithmetic, also called binary arithmetic. The columns go (right to left) units,2s,4s,8s,16s... just like base ten, which is units,10s,100s,1000s - we multiply by the base to move left a column. When we subtract a 1 from a zero it can't be done (same in base 10) and so we have to borrow 1 from the 2s column. So, 2-1=1 or in binary 10-01=01. We carry on subtracting each column until we have an answer.

For more information google binary arithmetic.

Mike.
 
the answer in the example you showed is
b=1 d1=1 d0=0

but you say it should be b=1 d1=0 d0=1

and what about the dont care case


?????//
 
I don't understand your table. I was explaining the 0-1=-1 and why this needs to borrow one from the twos column.

Did you try googleing?

Mike.
 
If it was base 3 it would also contain 2s and 10-1 would equal 02. It is binary.

Mike.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top