zhi_hong
CR2032 Battery

Pogi/Ganda Points: 0
Offline
Posts: 23
|
 |
« on: April 17, 2008, 03:25:45 PM » |
|
how do u solve binary subtraction 1000.012 - 111.112 without converting to other bases?
|
|
|
|
|
Logged
|
|
|
|
|
The Philippine Electronics and Technology Forum
|
 |
« on: April 17, 2008, 03:25:45 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
'yus
Technical People
Nuclear Reactor
   
Pogi/Ganda Points: 274
Offline
Gender: 
Posts: 4170
oops, kernel panic!
|
 |
« Reply #1 on: April 17, 2008, 04:13:26 PM » |
|
... without converting to other bases?
pwede rin yung direct subtaction.. pero mas madali pa rin kung iko-convert muna sa decimal, para ma-verify na rin.. and according to MathCAD:  
|
|
|
|
|
Logged
|
join PhilRobotics - Amateur Robotics Club of the Philippines
|
|
|
zer0w1ng
Technical People
Gas Turbine
   
Pogi/Ganda Points: 295
Offline
Gender: 
Posts: 2151
Enter any 11-digit prime number to continue...
|
 |
« Reply #2 on: April 17, 2008, 04:19:32 PM » |
|
It is done this way: 1 0 0 0. 0 1 - 1 1 1. 1 1 ------------------- 0
borrow one from left, like normal subtraction 0 1 1 1. 10 1 - 1 1 1. 1 1 ------------------- 0 0 0. 1 0
As you see, this works like long-hand subtraction. Just shift the borrow from right to left.
|
|
|
|
|
Logged
|
|
|
|
rdpzycho
Technical People
Solar Power Satellite
   
Pogi/Ganda Points: 467
Offline
Gender: 
Posts: 9160
Perfection is an Illusion
|
 |
« Reply #3 on: April 17, 2008, 09:38:22 PM » |
|
too bad bawal ang decimal point sa calculator ko...  nung college pag quiz kailangan direct binary ang solution mo pero I do the decimal verification mentally...
|
|
|
|
|
Logged
|
"Keep on starting, and finishing will take care of itself."
- Neil Fiore
|
|
|
'yus
Technical People
Nuclear Reactor
   
Pogi/Ganda Points: 274
Offline
Gender: 
Posts: 4170
oops, kernel panic!
|
 |
« Reply #4 on: April 17, 2008, 09:50:03 PM » |
|
dati, parang may nagturo samin kung pa'no mag-compute sa calculator kahit yung radix point, di ko lang maalala kung pa'no na.. 
|
|
|
|
|
Logged
|
join PhilRobotics - Amateur Robotics Club of the Philippines
|
|
|
zer0w1ng
Technical People
Gas Turbine
   
Pogi/Ganda Points: 295
Offline
Gender: 
Posts: 2151
Enter any 11-digit prime number to continue...
|
 |
« Reply #5 on: April 18, 2008, 07:48:33 AM » |
|
Radix point is just for alignment during computation. Just align both radix points of operands and do the operation ignoring the point and adding zeros to the right if it is shorter than the other operand.
|
|
|
|
|
Logged
|
|
|
|
Inactive
Size AAA Battery
 
Pogi/Ganda Points: 1
Offline
Gender: 
Posts: 80
Electrifying!
|
 |
« Reply #6 on: April 18, 2008, 08:22:56 PM » |
|
1000.01 - 111.11 ----------- 1010.10
|
|
|
|
|
Logged
|
|
|
|
zer0w1ng
Technical People
Gas Turbine
   
Pogi/Ganda Points: 295
Offline
Gender: 
Posts: 2151
Enter any 11-digit prime number to continue...
|
 |
« Reply #7 on: April 19, 2008, 08:35:10 AM » |
|
1000.01 - 111.11 ----------- 1010.10
This is incorrect. The second digit from the right should do a borrow because it is 0 - 1. See my post above showing the borrow.
|
|
|
|
|
Logged
|
|
|
|
Inactive
Size AAA Battery
 
Pogi/Ganda Points: 1
Offline
Gender: 
Posts: 80
Electrifying!
|
 |
« Reply #8 on: April 19, 2008, 09:07:39 AM » |
|
1000.01 - 111.11 ----------- 1010.10
my bad.. 
|
|
|
|
|
Logged
|
|
|
|
zer0w1ng
Technical People
Gas Turbine
   
Pogi/Ganda Points: 295
Offline
Gender: 
Posts: 2151
Enter any 11-digit prime number to continue...
|
 |
« Reply #9 on: April 19, 2008, 09:24:37 AM » |
|
Don't worry.  It's all part of learning. I too commit MANY mistakes and learn from it. 
|
|
|
|
|
Logged
|
|
|
|
zhi_hong
CR2032 Battery

Pogi/Ganda Points: 0
Offline
Posts: 23
|
 |
« Reply #10 on: April 25, 2008, 01:00:10 PM » |
|
pano naman po iconvert directly from gray to binary? i can make a table pero ubos ata oras ko kung ginawa ko un...
|
|
|
|
|
Logged
|
|
|
|
rdpzycho
Technical People
Solar Power Satellite
   
Pogi/Ganda Points: 467
Offline
Gender: 
Posts: 9160
Perfection is an Illusion
|
 |
« Reply #11 on: April 25, 2008, 02:09:37 PM » |
|
hindi ko na maalala ang Gray Code. ang naaalala ko lang merong techniques to convert long strings to binary, I think it's XOR. may mga quiz kami na mahahabang strings ng Gray Code ang pinapadecode.
|
|
|
|
|
Logged
|
"Keep on starting, and finishing will take care of itself."
- Neil Fiore
|
|
|
synchronous
CR2032 Battery

Pogi/Ganda Points: 0
Offline
Gender: 
Posts: 46
|
 |
« Reply #12 on: September 27, 2008, 07:41:35 AM » |
|
use 1's or 2nd complement po try mo
|
|
|
|
|
Logged
|
gagraduate din ako, hindi ko lang alam kung kelan
|
|
|
|
bLacK_aNgeL
|
 |
« Reply #13 on: October 07, 2008, 02:01:11 PM » |
|
use 1's or 2nd complement po try mo
@synchronous ganyan po gamit namin s logic pang solve kasi bawal calculator.. hehe..  icomplement muna tapos addition n un.. mas madali un.. hehe
|
|
|
|
|
Logged
|
if you can't handle my worst you don't deserve my best..
|
|
|
engineerwafu
LR44 Battery
Pogi/Ganda Points: 0
Offline
Posts: 1
|
 |
« Reply #14 on: December 21, 2009, 11:57:47 AM » |
|
use xor operation. ginagamit din ang xor for subtraction.
|
|
|
|
|
Logged
|
|
|
|
|
The Philippine Electronics and Technology Forum
|
|
|
|
|
|
Logged
|
|
|
|
|