Sunday 21 October 2012

Number System Conversion (by amirul firuz)

Decimal to Binary

Let's take 4310

read it from below to top, and you will get 1010112



Decimal to Hexadecimal

Let's take 241310

Weight
163
162
161
160
16-1
16-2
Value Represented
4096
256
16
1
0.0625
0.00390625

Hexadecimal

9
6
13 = D


2413 - (256 x = 2304) = 109
109 - (16 x 6 = 96) = 13
13 - (1 x 13 = 13) = 0            **13 in hexadecimal is D

the answer is 96D16 



Binary to Hexadecimal

Let's take 100011010011.11112

  1       0       0        0
  1        1       0       1
   0      0       1      1
.
   1       1       1      1
8(1)+4(0)+2(0)+1(0)
8(1)+4(1)+2(0)+1(1)
8(0)+4(0)+2(1)+1(1)
.
8(1)+4(1)+2(1)+1(1)
=8
=13 = D
=3
.
=15 =F

the answer is 8D3.F16




Hexadecimal to Binary

Let's take 15A.D16

1 digit in hexadecimal represent 4 digits in binary. We can do this directly.

116 = 110 = 00012
516 = 110 = 01012
A16 = 1010 = 10102
D16 = 1310 = 11012


Thus, 15A.D16 = 101011010.11012



2’s Complement Number by (by amirul firuz)

We use of 2’s complement number because in microprocessor-base equipment, binary cannot do a minus operation. The equation need to be change from minus to plus ( a-b = a+(-b) ).

As an example, 
10 – 5

in binary 10 = 10102, while 5 = 1012
10102 - 1012

change it into this operation 10 + (-5),
**(remember!! -5 ≠ -1012 !!!)

to get -5 in binary, change 1 with 0, 0 with 1,
1012  0102                **(1st complement)
then add 1,
0102 + 12 = 0112     **(2nd complement)

thus, (-5) = 112

10 + (-5)  =  10102 + 112  =  11012  =  1012  (*ignore the overflow)

Now you completed the 2 complement section!



Combinational Circuits


Boolean Eqution Forms

A Boolean algebra is the combinations of variables and operators.Typically, it has one or more inputs and produces an output in the range of 0 or 1.

All Boolean eqution can be represented in two forms:

Ø  Sum-of-products (SOP)

-          Combination of input values that produce 1s is the convert into equivalent variables ANDed together then ORed with other combination variables with the same output.
-          SOP is easier to derive from truth table.


SOP expression
F= (A’B’C’D’) + (A’B’C’D) + (A’B’CD) + (ABC’D)

Ø  Product-of-sums (POS)

-Input combinations that produces 0 in sum terms
-Covert input values that produces 0s into equivalent variables,ORed the variables,then ANDed with other ORed forms.
-Usually use if more 1s produces in output function.

Example:-
F=(A+B+C)(A+B+C’)(A+B’+C)(A’+B+C)

The truth table:



 POS expression:
F=(A+B+C)(A+B+C’)(A+B’+C)(A’+B+C)

By  Nazirul Anwar B. Jamil



Basic of Logic Gates


4.1 Basic Revision Of Logic Gates.
Boolean algebra uses variable and operators to represent logic circuits. The variable and function have only one value, 0 and 1. The complement of a variable is shown by a bar over the letter such as  or apostrophe (A’). Table 4-1 summarizes logic gates as the symbol of the function in Boolean expressions.
4.2 Combinational circuits.
Can be defined in three ways:

1.    Truth table – The truth table shows many possible of input values,in tabular from between the input values and the result of a specific Boolean operator or combination on the input variables.


2.    Graphical symbols – the layout of connected gates that represent the logic circuit.

3.    Boolean equations – Boolean function that consists possible combination of input that produce an output signal.

by Muhd. Firdaus B. Mohd. Nor




Learning Binary Number Operation like A B C ^^


BASIC BINARY NUMBER OPERATION


Hye there, now the session is with me Muhamad Firdaus Afandi Bin Majid, I’m going to explain about basic binary number operation. As we know binary come from the ‘BI’ that means two. So in this case binary also represent two items which are 1 and 0. As for the basic binary number operation it contain four elements. Binary Addition, Binary Subtraction, Binary Multiplication and Binary Division. Hope you understand and enjoy the post ^^


Binary Addition


Basically that we need to know is there are 4 rules that we need to obey in binary addition just as shown in the table.

Binary Rules
Sum
Carry
0 + 0 = 0
0
0
0 + 1 = 1
1
0
1 + 0 = 1
1
0
1 + 1 = 1
0
1
 


Example on how to do Binary Addition


Still don’t understand?? Do not worry, here I included a link that make your understanding a lot more clearer. There are step of images to solve binary addition problems. Check it out.





Binary Subtraction




Next , doing binary subtraction is easy like learning A B C and 1 2 3, just a little more advance of course. Haha. Anyway, still remember how we solve a math equation that have a subtraction on it?? It is quite the same method but different understanding.



On what we learn on primary school, we borrow the number on its left neighbor and then add it to the right number by ten. Just like the image above we borrowed seven and add to the two thus it will become twelve.






Contrary on Binary subtraction is we borrow the value from the value 1 from the borrowed and the value of the borrower that is zero will become 1. Then the subtraction process will go just like in the table below. 

Binary Rules
Sum
Borrow
0 – 0 = 0
0
0
0 – 1 = 1
1
10
1 – 0 = 1
1
0
1 - 1 = 1
0
1
 



We also include some video from the youtube for you to be clear about Binary Subtraction. Credit to d4rkpho3n1x.





Binary Multiplication

Now we move on to the next operation which is Binary Multiplication.

Same like the before two other operation, there are four rules that we should follow in Binary Multiplication.

Binary Rules
Multiply
0 x 0 = 0
0
0 x 1 = 1
0
1 x 0 = 1
0
1 x 1 = 1
1






Binary Division

Now we come to the last part of the basic binary operation which is binary division.

In Binary division follow the same procedure as binary multiplication.

Here I included some tutorial video from the youtube, this time credit goes to David Williams.