The Philippine Electronics and Technology Forum
July 30, 2010, 06:04:42 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  

Pages: [1]   Go Down
  Print  
Author Topic: binary opration  (Read 1676 times)
zhi_hong
Size AAA Battery
*

Pogi/Ganda Points: 0
Offline 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 Offline

Gender: Male
Posts: 3795


eclair-android 21-cell


WWW
« 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:  Grin
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 Offline

Gender: Male
Posts: 2063


Enter any 11-digit prime number to continue...


WWW
« Reply #2 on: April 17, 2008, 04:19:32 PM »

It is done this way:

Code:
  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 Offline

Gender: Male
Posts: 6893


"Necessity, who is the mother of invention." Plato


WWW
« Reply #3 on: April 17, 2008, 09:38:22 PM »

too bad bawal ang decimal point sa calculator ko... Grin

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 Offline

Gender: Male
Posts: 3795


eclair-android 21-cell


WWW
« 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..  Cry
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 Offline

Gender: Male
Posts: 2063


Enter any 11-digit prime number to continue...


WWW
« 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 Offline

Gender: Male
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 Offline

Gender: Male
Posts: 2063


Enter any 11-digit prime number to continue...


WWW
« 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 Offline

Gender: Male
Posts: 75


Electrifying!


« Reply #8 on: April 19, 2008, 09:07:39 AM »

  1000.01
-  111.11
-----------
  1010.10


my bad.. Cry
Logged

zer0w1ng
Technical People
Gas Turbine
*****

Pogi/Ganda Points: 270
Offline Offline

Gender: Male
Posts: 2063


Enter any 11-digit prime number to continue...


WWW
« Reply #9 on: April 19, 2008, 09:24:37 AM »

Don't worry.  Smiley  It's all part of learning.
I too commit MANY mistakes and learn from it.  Smiley
Logged

zhi_hong
Size AAA Battery
*

Pogi/Ganda Points: 0
Offline 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 Offline

Gender: Male
Posts: 6893


"Necessity, who is the mother of invention." Plato


WWW
« 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 Offline

Gender: Male
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 Offline

Gender: Female
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..
 Roll Eyes Roll Eyes
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 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
Pages: [1]   Go Up
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
create your own POV/Binary Clock « 1 2 3 4 5 »
PIC Microcontroller
yus 89 5542 Last post August 15, 2009, 02:30:29 AM
by forhim007
Binary Wireless Transmission
Mixed Signal and ASICs
kutonglupa 5 836 Last post October 22, 2008, 11:22:16 AM
by robasimo
Binary to BCD converter
General Digital Design
mr.Electro 2 400 Last post February 24, 2009, 01:29:31 PM
by mr.Electro
Binary Dates: Have you Noticed
Chit Chat
gunbladespecialist 0 76 Last post January 12, 2010, 09:28:30 AM
by gunbladespecialist
how to multiply 12 bit binary to the sine wave using vhdl?
PLC, PLD, SPLD, GAL, CPLD, FPGA, FPAA
popo_gajud 1 237 Last post March 01, 2010, 07:09:48 PM
by marcelino
4bit Binary Calculator or suggest another
General Digital Design
kedeva 0 207 Last post March 09, 2010, 05:35:50 AM
by kedeva
Binary Clock
General Digital Design
geneanthonytarca 8 262 Last post June 28, 2010, 01:11:28 AM
by geneanthonytarca
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!