Translate page

Saturday, December 7, 2013

DIGITAL BASIC - 1.2 : DIGITAL ARITHMETIC



Index Chapter1 Chapter2 Chapter3 Chapter4
Digital
Background
Semiconductor Background CMOS
Processing


1.1 1.2 1.3a 1.3b 1.4 1.5 1.6
Number
System
Digital
Arithmetic
Logic
Gates
Logic
Gates
Combinational
Circuits
Multiplex
(MUX)


Binary Arithmetic

Below are the basics which most of us know very well. But still for reference point of view I have mentioned everything into a table followed by examples.

Binary addition
Binary subtraction
Binary multiplication
Binary Division
0+ 0 =0
0 – 0 = 0
0 x 1 = 0
0 ÷ 1 = 0
0 + 1 =1
1 – 0 = 1
1 x 0 = 0
1 ÷ 1 = 1
1 + 0 = 1
1 – 1 = 0
0 x 0 = 0

1 + 1 = 10
1 in (10) is Carry bit
Carry it to the next
higher order column
0 – 1 = 10
1 in (10) is Borrow bit
Carries from to the next higher order column
1 x 1 = 1






Hexadecimal Arithmetic

Hex addition rule
Subtraction
F + 1 = 10
10 – 1 = F
F + F = 1E
A – 1 = 9
F + F + 1 = 1F

1 + 1 = 2

9 + 1 = A


Hexadecimal Arithmetic (Best Way)
Best way to do hexadecimal arithmetic (Subtraction | Addition | Multiplication |Division) is –
  • First convert the number into decimal equivalents
  • Perform the operation
  • Convert back from decimal to hexadecimal
Note: Above method can be used for any number system. 


BCD Addition
There is a difference in binary addition and BCD addition. In binary maximum possible number is 1111 but in BCD, it is 1001. When the binary sum is equal to or less than 1001 (without a carry), corresponding BCD digit is correct. However, when binary sum is greater than or equal to 1010, the result is an invalid BCD digit. The addition of 6 = (0110)2  to the binary sum converts it to the correct digit & also produces a carry as required. This is because the difference between a carry in the most significant bit position of the binary sum & a decimal carry differ by 16 - 10 = 6
 Example 6:  Add 184 & 576 in BCD

BCD carry
        1

       1





   0001

  1000

0100

  184

+0101

  0111

0110

+576
Binary sum
   0111

10000

1010


Add 6


  0110

0110


BCD sum
   0111

  0110

0000

  760

Boolean properties



AND function
X. 0 = 0
0. X = 0
X. 1 = X
1. X = X
OR function
X + 0 = X
0 + X = X
X + 1 = 1
1 + X = 1
Commutative laws

x. y = y. x
x + y = y + x
Distributive laws
x(y +z) = x.y + x.z
x + y. z = ( x+y) (x + z)
Associative laws
x(y.z) = (x. y) z
x + ( y + z) = (x + y) +z
Absorption laws
x + xy =  x
x(x + y) = x
x + x'y = x+ y
x(x' + y) = xy
Demorgan’s laws
(x + y)' = x'. y'
(x. y)' = x' + y'
Duality Principle
x + x = x           =>               x .x = x                         by duality
x + 1 = 1          =>                x. 0 = 0                        by duality
x + xy = x         =>                x(x + y) = x                  by duality
x + y = y + x     =>                xy = yx                        by duality
x + (y+ z) = (x + y) + z     =>     x(yz) = (xy)z            by duality



6 comments:

  1. Thanks for sharing these useful information! This is really interesting information for me.

    ReplyDelete
  2. As a consequence of this law, if you want to change your life, you need to change your thoughts first.guarantor loans

    ReplyDelete
  3. In binary subtraction 0-1 should be 1

    ReplyDelete
  4. I blog quite often and I really thank you for your content.
    This great article has truly peaked my interest. I'm going to take a note of your blog and
    keep checking for new information about once per week.
    I subscribed to your Feed as well.

    ReplyDelete
  5. nice ! usefull content short & simple.
    thanks

    ReplyDelete
  6. 0 minus 1 should be one ! please correct that.

    ReplyDelete

Must Read Article

Related Posts Plugin for WordPress, Blogger...