Logice \\ desiger Sadiq AL-Hoshan SADIQ
Decimal number to binary conversion
Division of integer part and successive quotients with base 2.
Multiplication of faction part and successive with base 2.
EX;1 (58)10--- ( )2
We take the rest in ascending order
division quotient The rest
58\2 29 0
29\2 14 1
14\2 7 0
7\2 3 1
3\2 1 1
1\2 0 1
We take the rest in ascending order
(58)10 = (111010)2
Binary number to Decimal conversion
Muliplication of integer part with Number of mattresses.
EX;2 (1101)2-- ( )10
3 2 1 0
(1101)=(1*2 )+(1*2 )+(0*2 )+(1*2 )
= 8+4+0+1
(1101)2= (13)10
EX;3 (0101)2-- ( )10
3 2 1 0
(0101)= (0*2 )+(1*2 )+(0*2 )+(1*2 )
1|Page
1|Page
Logice SADIQ
=0+4+0+1 --- (0101)2-- (5)10
Decimal to octal conversion
At first we switch to the binary and then to the octal
OCTALL A B C
0 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1
EX;4 (58)10--- ( )8
At first we switch to the binary
The solution in Example # 1
(58)10=(111010)2
then to the octal
(111010)2 ( )8
(72)8 According to the above table
2|Page
2|Page
Logice SADIQ
EX;5 (45)10- ( )8
We take the rest in ascending order
division quotient The rest
45\2 22 1
22\2 11 0
11\2 5 1
5\2 2 1
2\2 1 0
1\2 0 1
We take the rest in ascending order
(101101)2
then to the octal
(101101)2 ( )8 According to the octet table
(55)8
Decimal number to Hexa-Decimal
At first we switch to the binary and then to Hexa-Decimal .
We also follow the steps of the hexadecimal system table.
EX;6 (58)10( )H
At first we switch to the binary
(58)10=(111010)2 The solution in Example # 1
Then to Hexa
3|Page
3|Page
Logice SADIQ
(111010)2 ( )H According to the table below (3A)H
Hexa A B C D
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
A 1 0 1 0
B 1 0 1 1
C 1 1 0 0
D 1 1 0 1
E 1 1 1 0
F 1 1 1 1
EX;7 (125)10 ( )H
At first we switch to the binary
division quotient The rest
125\2 62 1 We take the rest in ascending order
62\2 31 0
31\3 15 1
15\2 7 1
7\2 3 1
3\2 1 1
1\2 0 1
(125)10 (1111101)2
Then to Hexa
01111101 We put a zero to the left of the number so that it is 4 bits
(01111101)2 (7d)H According to the hexadecimal table
4|Page
4|Page
Logice SADIQ
Notes:
When converting from decimal to octal, we
have to go through the binary system to
facilitate the solution
Dec10 Bin2 oct8
When converting from decimal to
hexadecimal, we have to go through the
binary system to make the solution easier
Dec10 Bin2 Hexa16
vice versa
logic circites:
1) Buffer
Sometimes in digital electronic circuits we need to isolate logic gates from
each other or have them drive or switch higher than normal loads (such as
relays, solenoids and lamps) without the need for inversion. One type of single
input logic gate, that allows us to do just that, is called the digital buffer.
5|Page
2) OR Gate
The output of this gate will be "true" if either or both of the inputs are "true". If both
inputs are "false", then the output is "false.
6|Page
3) NOR Gate
Its output is "true" if both inputs are "false". Otherwise, the output is "false". The
symbol is an OR gate with a small circle on the output. The small circle
represents inversion. This is also shown as (A+B) with a bar over the top.
7|Page
1) AND Gate
One of the easiest gates to understand is the AND gate, so-called because the
output of this gate will be "true" if and only if all inputs (first input and the
second input) are "true". Otherwise, the output is "false."
2) NOT Gate
It has only one input. It reverses the logic state. If the input is 1, then the
output is 0. If the input is 0, then the output is 1. This is also shown as (A'), or A
with a bar over the top, as shown below.
8|Page
g
NAND Gate
The output of a NAND gate is "true" if any of the inputs are "false". The symbol is an AND gate with
a small circle on the output to illustrate this output signal inversion. This is also shown as (A.B) with a
bar over the top. The truth table for a NAND gate is opposite to the AND gate.
9|Page