The Philippine Electronics and Technology Forum
February 10, 2012, 09:56:16 AM *
Welcome, Guest. Please login or register.

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

Pages: [1]   Go Down
  Print  
Author Topic: binary opration  (Read 2180 times)
zhi_hong
CR2032 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
Nuclear Reactor
*****

Pogi/Ganda Points: 274
Offline Offline

Gender: Male
Posts: 4170


oops, kernel panic!


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

join PhilRobotics - Amateur Robotics Club of the Philippines
zer0w1ng
Technical People
Gas Turbine
*****

Pogi/Ganda Points: 295
Offline Offline

Gender: Male
Posts: 2151


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

Gender: Male
Posts: 9160


Perfection is an Illusion


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

‎"Keep on starting, and finishing will take care of itself."

- Neil Fiore
'yus
Technical People
Nuclear Reactor
*****

Pogi/Ganda Points: 274
Offline Offline

Gender: Male
Posts: 4170


oops, kernel panic!


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

join PhilRobotics - Amateur Robotics Club of the Philippines
zer0w1ng
Technical People
Gas Turbine
*****

Pogi/Ganda Points: 295
Offline Offline

Gender: Male
Posts: 2151


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 AAA Battery
***

Pogi/Ganda Points: 1
Offline Offline

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

Gender: Male
Posts: 2151


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 AAA Battery
***

Pogi/Ganda Points: 1
Offline Offline

Gender: Male
Posts: 80


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

Gender: Male
Posts: 2151


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
CR2032 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: 467
Offline Offline

Gender: Male
Posts: 9160


Perfection is an Illusion


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

‎"Keep on starting, and finishing will take care of itself."

- Neil Fiore
synchronous
CR2032 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 D Battery
******

Pogi/Ganda Points: 13
Offline Offline

Gender: Female
Posts: 322


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
LR44 Battery
*

Pogi/Ganda Points: 0
Offline 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
Pages: [1]   Go Up
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Binary Dates: Have you Noticed
Chit Chat
gunbladespecialist 0 179 Last post January 12, 2010, 10:28:30 AM
by gunbladespecialist
how to multiply 12 bit binary to the sine wave using vhdl?
PLC, PLD, SPLD, GAL, CPLD, FPGA, FPAA
aln 1 508 Last post March 01, 2010, 08:09:48 PM
by marcelino
Binary Clock
General Digital Design
geneanthonytarca 8 761 Last post June 28, 2010, 01:11:28 AM
by geneanthonytarca
convertion of BCD to octal, binary, hexa
General Digital Design
nevaeh 2 292 Last post August 08, 2011, 11:36:55 PM
by nevaeh
10 bit binary to decimal converter
PIC Microcontrollers
clare 14 212 Last post December 12, 2011, 05:25:49 PM
by clare
[HELP] - 74ls193 Binary Counter
General Digital Design
FarProd 0 34 Last post February 07, 2012, 10:11:23 AM
by FarProd
[HELP] - 74ls193 Binary Counter
COE Students
FarProd 0 12 Last post February 07, 2012, 10:22:27 AM
by FarProd
Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!