Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Binary mathematics

created by Gospel

(thing) by Gospel (9.2 mon) (print)   ?   (I like it!) Thu Sep 26 2002 at 3:41:30

The following are the steps for addition, subtraction, division, and multiplication of binary numbers.

Addition of Binary Numbers:

Addition is much like solving decimal addition problems. Add each row of digits from right to left.
Example1:          Example2:
101101110           10111110
+ 1011010          + 1011110  
_________          _________
111001000          100011100

With addition, there are four important rules to remember. These four rules will help you solve any binary addition problem you will face:

  • 0 + 0 = 0
  • 1 + 0 = 1
  • 1 + 1 = 0, plus 1 carry (carry over to the next number)
  • Carry + 1 + 1 = 1, plus 1 carry

Subtraction of Binary Numbers:

Example1:          Example2:
 º¹ º¹               º¹¹ º¹   
 10110              1100110
-01101             -1011001
______             ________
  1001                 1101

Like decimal subtraction, it is often required to borrow from the next digit. ¹ equals a borrow of one, and º equals a change as a result of the borrow.

Multiplication of Binary Numbers:

Example1:          Example2:
    1100100             10110111
    x 01011             x 111111
    _______             ________
    1100100             10110111
   11001000            101101110
  000000000           1011011100
 1100100000          10110111000
00000000000         101101110000
___________        1011011100000 
01101001100        _____________ 
                  10110100001001            

Know your 1 and 0 times tables? Then the rest is easy. Simply multiply each top number by the first digit in the multiplier. Be sure to remember your place holders; omitting them will screw up the answer. Then, once you have your big mess of ones and zeroes, add them together with the addition techniques above.

Division of Binary Numbers:

Example1:          Example2:

      10101.1              10110
   _________           __________
10 | 101011.0      101 | 1101110
    -10                  101
      010                  111
      -10                  101
        011                 101
        -10                 101
          10                  00
          10
           0

Long division is the most efficient approach here. This will require lots of subtraction, so learn from the lesson above. Divide the number into the first number, subtract it underneath the quotient, drop the next digit down to the answer, and divide the dividend into that number. Repeat these steps until you can work no longer.


printable version
chaos

carry lookahead adder Converting real numbers to binary Quadratic Equation linked list
Radix Point i^i binary binary arithmetic
twos complement Matrix square root Multiplication
division subtraction Addition and
octal hexadecimal
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
What you are reading:
2100010006
chocolate sorbet
Nobuo Fujita's 400 year old Samurai sword
Flatland: Table of Contents
How Network Adapters Work
MIT Guide to Lockpicking
I once had a cavity
Just friends syndrome
E2 Gatherings
Toby lied
e
censorship
Vietnam War
New Writeups
Simulacron3
Sensing and Perceiving(essay)
StrawberryFrog
Bore(person)
Heitah
The Davy Crockett Weapon System(thing)
Timeshredder
Indiana Jones and the Kingdom of the Crystal Skull(review)
aneurin
Miles Francis Stapleton Fitzalan Howard, 17th Duke of Norfolk(person)
Bitriot
flashover(thing)
tejasa
Cranberry Cornbread(recipe)
Dreamvirus
Brighton Bombing(event)
Ariloulaleelay
'Appendices' to a 'Report' on THE HIVE×BODY MACHŸNE(log)
Timeshredder
WALL-E(review)
sitaraika
Win-laik-pya(idea)
whitelight
The abysmalists(poetry)
Hazelnut
How to solve the obesity epidemic and the oil price hike in one fell swoop(idea)
raincomplex
Spitting out teeth like ampersands(place)
wertperch
July 4, 2008(personal)
This affordable entertainment brought to you by The Everything Development Company