zhi_hong
Size AAA 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
Hydroelectric
   
Pogi/Ganda Points: 218
Offline
Gender: 
Posts: 3795
eclair-android 21-cell
|
 |
« 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
|
BOOL will_take_job(char * new_company){ if( (high_salary & challenging_field & excellent_management) || (N_females/N_males>=10) ) return TRUE; else return FALSE; }
|
|
|
zer0w1ng
Technical People
Gas Turbine
   
Pogi/Ganda Points: 270
Offline
Gender: 
Posts: 2063
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: 210
Offline
Gender: 
Posts: 6893
"Necessity, who is the mother of invention." Plato
|
 |
« 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
|
"...PERFECTION would render us obsolete." - Kurotsuchi Mayuri
|
|
|
yus
Technical People
Hydroelectric
   
Pogi/Ganda Points: 218
Offline
Gender: 
Posts: 3795
eclair-android 21-cell
|
 |
« 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
|
BOOL will_take_job(char * new_company){ if( (high_salary & challenging_field & excellent_management) || (N_females/N_males>=10) ) return TRUE; else return FALSE; }
|
|
|
zer0w1ng
Technical People
Gas Turbine
   
Pogi/Ganda Points: 270
Offline
Gender: 
Posts: 2063
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 AA Battery

Pogi/Ganda Points: 1
Offline
Gender: 
Posts: 75
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: 270
Offline
Gender: 
Posts: 2063
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 AA Battery

Pogi/Ganda Points: 1
Offline
Gender: 
Posts: 75
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: 270
Offline
Gender: 
Posts: 2063
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
Size AAA 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: 210
Offline
Gender: 
Posts: 6893
"Necessity, who is the mother of invention." Plato
|
 |
« 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
|
"...PERFECTION would render us obsolete." - Kurotsuchi Mayuri
|
|
|
synchronous
Size AAA 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
Size C Battery
 
Pogi/Ganda Points: 6
Offline
Gender: 
Posts: 234
i love sukolates...
|
 |
« 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
Size AAA Battery
Pogi/Ganda Points: 0
Offline
Posts: 1
|
 |
« Reply #14 on: December 21, 2009, 10:57:47 AM » |
|
use xor operation. ginagamit din ang xor for subtraction.
|
|
|
|
|
Logged
|
|
|
|
|
The Philippine Electronics and Technology Forum
|
|
|
|
|
|
Logged
|
|
|
|
|