Sunday 7 October 2012

Topic 1 Subtopic 4: Basic Binary Number Operation

A binary number operation will be focusing only in addition, subtraction, multiplication and division.


Binary Addition

Adding binary numbers is a simple task and very similar to the addition of decimal numbers. As with decimal numbers, you start by adding the bits (digits) one column, or place weight, at a time, from right to left. Unlike decimal addition, there is little to memorize in the way of rules for the addition of binary bits:
0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 10
1 + 1 + 1 = 11

 
Adding two binary numbers together is like adding decimal numbers, except 1 + 1 = 10 (in binary), so you have to carry the one to the next column:
  0001
+ 0100
  ----
  0101
  0001
+ 0001 
  ----
  0010 (1 plus 1 is 10,carry the 1 to the next column)
  0011
+ 0011 
  ----
  0110 (1 + 1 = 10, so carry; then 1 + 1 + 1 = 11, so carry again)
  0011
+ 0101 
  ----
  1000 (carry in every column here)

Binary Subtraction

Work the columns from right to left subtracting in each column. If must subtract a one from a zero, you need to borrow from the left , just as in decimal subtraction.
* 1011011 − 10010 = 1001001:
1011011
10010
1001001

*  00100101 − 00010001 = 00010100:
           
0
  0  0  1 10  0  1  0  1   - 0  0  0  1  0  0  0  1  0  0  0  1  0  1  0  0
 * 00110011 − 00010110 = 00011101:

              0 10  1
       0  0  1  1  0 10  1  1  
     - 0  0  0  1  0  1  1  0
       0  0  0  1  1  1  0  1

Binary Multiplication

Binary multiplication uses the same technique as decimal multiplication. In fact, binary multiplication is much more easy because each digit we multiply by is either zero or one. Multiplication is achieved by adding a list of shifted multiplicands according to the digits of the multiplier.
* 1011 x 1101 = 10001111:
                                    1 0 1 1
                 x 1 1 0 1
                            -------------
                                1 0 1 1
                              0 0 0 0
                            1 0 1 1
                          1 0 1 1
                      -----------------
                      1 0 0 0 1 1 1 1    
   
1011.01 x 110.1 = 1001001.001:
                                1 0 1 1.0 1
                        x             1 1 0.1
                          ------------------
                                1 0 1 1 0 1
                             0 0 0 0 0 0
                          1 0 1 1 0 1
                       1 0 1 1 0 1
                    ----------------------
                    1 0 0 1 0 0 1.0 0 1  

   

Binary Division

Binary division is the repeated process of subtraction, just as in decimal division.
*  100010010 ÷ 1101 = 000010101: 
_ *  1011.11 ÷ 11 = 11.1110:
_                                                  1 1 . 1 1 1 0                       1 1 ) 1 0 1 1 . 1 1 0 0 0                            - 1 1         1 0 1         - 1 1         1 0 1         - 1 1          1 0 1         - 1 1         1 0 0         - 1 1         1 0 0 ---> Repeated
 
 
 


Goh Menning              B031210149
 

12 comments:

  1. Clear info and easy to understand..Good job =)

    ReplyDelete
  2. clearly explained. well managed. great job!

    ReplyDelete
  3. I don't have a clue about this but after going through these information I get it now though. You've made it simple and easy for me to digest and learn about it. Nice one =) Every steps and details are clearly shown which made it pretty easy to understand =D

    ReplyDelete
  4. good and well explanation! keep it up!

    ReplyDelete
  5. Clear and Good. Easy to understand!

    ReplyDelete
  6. Its really a nice and useful piece of information. I am glad that you just shared this useful information with us :D

    ReplyDelete
  7. Simple and it helps alot! :D

    ReplyDelete
  8. Thanks for sharing the information. Hope to see more from u :D

    ReplyDelete
  9. Wow such great information.. it helps alot.. thanks...

    ReplyDelete
  10. wow, awesome! cool, simple, and useful :)

    ReplyDelete