Number system
- Decimal
- Binary
- Octal
- Hexa-Decimal
Decimal
Binary
Octal
Hexa-Decimal
Conversion
Any number system To Decimal
Decimal to Any number system
Step 1: Divide the given decimal number by "2".
Step 2: Keep both remainder and quotient.
Step 3: Repeat step1 and 2, until you get "1" as quotient.
Step 4 : Keeping last quotient as MSB and all the remainders in bottom to top order, the required binary number will be obtained.
Example,
(32)10 => Binary
Step 1: Divide the given decimal number by "8".
Step 2: Keep both remainder and quotient.
Step 3: Repeat step1 and 2, until you get 1,2,3,4,5,6 or 7 as quotient.
Step 4 : Keeping last quotient as MSB and all the remainders in bottom to top order, the required octal number will be obtained.
Example,
(64)10 => Octal
Step 1: Divide the given decimal number by "16".
Step 2: Keep both remainder[in the form of hexa-decimal] and quotient.
Step 3: Repeat step1 and 2, until you get 1,2,3,4,5,6,7,8,9,A,B,C,D or E as quotient.
Step 4 : Keeping last quotient as MSB and all the remainders in bottom to top order, the required octal number will be obtained.
Example,
(64)10 => Hexa-decimal
Binary to Octal/Hexa-Decimal
Octal/Hexa-Decimal to Binary
Conversion Table
Binary Number Representation
There are 2 different kind of binary numbers representation.
Unsigned Binary
Unsigned number contains only magnitude of the number.
Representation of Unsigned Binary
8 Bit unsigned number will be used to represent 0 to +255.
(11100101)2 => (1 x 20) + (0 x 21) + (1 x 22) + (0 x 23) + (0 x 24) + (1 x 25) + (1 x 26) + (1 x 27)
=> (229)10
Signed Binary
Signed number contains both sign and magnitude of the number. MSB bit indicates the sign of the number.
Representation of Signed Binary
There are 3 different kind of representation of Signed Binary numbers.
- Sign Bit Magnitude
- 1's complement
- 2's complement
(11100101)2 => (1 x 20) + (0 x 21) + (1 x 22) + (0 x 23) + (0 x 24) + (1 x 25) + (1 x 26)
=> (-101)10
(00000101)2 => (1 x 20) + (0 x 21) + (1 x 22) + (0 x 23) + (0 x 24) + (0 x 25) + (0 x 26)
=> (+5)10
(11100101)2 => 00011010 => (0 x 20) + (1 x 21) + (0 x 22) + (1 x 23) + (1 x 24) + (0 x 25) + (0 x 26) + (0 x 27)
=> (-26)10
(00000101)2 => (1 x 20) + (0 x 21) + (1 x 22) + (0 x 23) + (0 x 24) + (0 x 25) + (0 x 26) + (0 x 27)
=> (+5)10
(11100101)2 => (1 x 20) + (0 x 21) + (1 x 22) + (0 x 23) + (0 x 24) + (1 x 25) + (1 x 26) + ((-1) x 27)
=> (-27)10
(00001101)2 => (1 x 20) + (0 x 21) + (1 x 22) + (1 x 23) + (0 x 24) + (0 x 25) + (0 x 26) + (0 x 27)
=> (+13)10
Representation Table
Logic Gates
AND Gate
Functionality
It will output High[1] only if all the inputs to the gate are High[1]. If any of the inputs to the AND gate is Low, it will output Low[0]. The function can be extended to any number of inputs.
Symbol
Boolean Expression
Truth Table
Implementation using Diode
OR Gate
Functionality
It will output Low[0] only if all the inputs to the gate are Low[0]. If any of the inputs to the OR gate is High, it will output High[1]. The function can be extended to any number of inputs.
Symbol
Boolean Expression
Truth Table
Implementation using Diode
NOT Gate
Functionality
It will invert the input being applied.
Symbol
Boolean Expression
Truth Table
NAND Gate
Functionality
It will output Low[0] only if all the inputs to the gate are High[1]. If any of the inputs to the AND gate is Low, it will output High[1]. Nand gate consists of an AND gate followed by a NOT gate[inverter].
Symbol
Boolean Expression
Truth Table
NOR Gate
Functionality
It will output High[1] only if all the inputs to the gate are Low[0]. If any of the inputs to the OR gate is High, it will output Low[0]. NOR gate consists of an OR gate followed by a NOT gate[inverter].
Symbol
Boolean Expression
Truth Table
XOR Gate
Functionality
It will output High[1] if both the inputs are different, else will output Low[0].
Symbol
Boolean Expression
Truth Table
XNOR Gate
Functionality
It will output High[1] if both the inputs are same, else will output Low[0]. XNOR gate consists of a XOR gate followed by a NOT gate.
Symbol
Boolean Expression
Truth Table
Universal Gates
Nand and Nor gates are called as universal gates, as we could implement other basic gates[AND,OR,NOT] just by using nand or nor gates.
Nand and Nor gates are called as universal gates, as we could implement other basic gates[AND,OR,NOT] just by using nand or nor gates.
Basic Gates Implementation using NAND
![](https://blogger.googleusercontent.com/img/a/AVvXsEiMITrp2wQSEpeJmYnlLygEtoiV_lCxBwQ5ezIhSW0KyS_J6fcVpfAHaQSi2tsNxIx3tTameP3d9eCZbuXOg5if4u3Ru8LCPywT3tyANtwt58ojRVVw-GlAy0IEpRSDY1viw3hdDFW9askJow2X3cqgX223O5f2N2eIFCAoZYwVIkyU4aJrEzkFo-P16qo5)
1.NOT using NAND
![](https://blogger.googleusercontent.com/img/a/AVvXsEieqyd6P4tHxd5f-bz2T7QPof5IPC0hmEuqEAip0SFzHrv94tDcomxIKkLIp56d-XJe241051ZvF1xopabvGhHNObf3K8E8TEh2jMBnlxbwVVGjVmZNgfFG4UmPlvn16GZDw1LJk02mFMuWb_fImX3CgGPZ9SHkHGfARPL7XUWXGpYZppeWtRNx994T7ONr=w320-h71)
As NOT gate have only 1 input and both not and nand have inverted version at the output, we could simply short 2 inputs of the NAND gate to make it behave as a NOT gate.
Below is the implementation,
![](https://blogger.googleusercontent.com/img/a/AVvXsEipcCBloLWrpeaEStDUpZ6QIgXRIONXcZj0DUYUUjcRO0BUaEytpLy1NgmGA3UaERd83k6Js3nk6PDtVDRH7LZGeFYO3ouKBFej3GLonP8TpFdNPwxCbeqS2vIShqpi74qEjDKwQ_iIEs_Nn6Ggu2NQSDLyenkn_zUseAxbFbfSlnkHKwyhIK_8bkz8hgwE=w276-h102)
2.AND using NAND
![](https://blogger.googleusercontent.com/img/a/AVvXsEiACOPyYQTZMmnKlEgBpIY8XPQvzseTa6MrfTLAlqyw8car97rTy2G_VEjHDWZ23JX5zVF34yG7txJhLa-d5ZKTVZDpoRHC47H8cZ2Ysovenmgal9a8gRNbsMSW-hwvrgqOKorj1NEXNmgg_0rcIJkINmto-a7mNDupyBnGVsmfzmS5sAmPxx7NsmMk2mBt)
If we look at the truth table of both the gates, we could clearly understand that the output of AND gate is just an inverted version of NAND gate's. So we can implement an AND gate by inverting the NAND gate's output. Since we have to implement the whole AND gate by NAND itself, we need an inverter also in the form of NAND gate.Below is the implementation,
![](https://blogger.googleusercontent.com/img/a/AVvXsEgOqQd_22xcS_aLH9LpMJkelYs-QTCY5_xlqUFqu7FG6_nmuItT3LuGIbLgb8MS0Qs0OQe8cbn1NvJFQAro6OlAgPhtHZBBik3Iw1_8etFGPxp3rHnxDWuVkIshb2OMYrwuQx6r89MBq6r7cDcRvd_wCcDTlrXSE_ZWpvBmg6V7pnciw84xZ-yNVsuIX9pr)
3.OR using NAND
As per the De Morgan's theorem,
2.AND using NAND
Below is the implementation,
3.OR using NAND
As per the De Morgan's theorem,
No comments:
Post a Comment