0% found this document useful (0 votes)
3 views2 pages

Day 2

The document covers number systems including binary, octal, decimal, and hexadecimal, along with conversion methods between them. It explains 1's and 2's complement for representing negative numbers, and introduces basic logic gates and their functions, including AND, OR, NOT, NAND, NOR, XOR, and XNOR. Additionally, it details combinational circuits like half adders and full adders, including their truth tables.

Uploaded by

mi8418545
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Day 2

The document covers number systems including binary, octal, decimal, and hexadecimal, along with conversion methods between them. It explains 1's and 2's complement for representing negative numbers, and introduces basic logic gates and their functions, including AND, OR, NOT, NAND, NOR, XOR, and XNOR. Additionally, it details combinational circuits like half adders and full adders, including their truth tables.

Uploaded by

mi8418545
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Day 2: Number Systems & Logic Gates

 Number Systems:
o Binary (Base-2): Uses 0 and 1. Example: 1010 (Binary) = 10 (Decimal)
o Octal (Base-8): Uses digits 0–7. Example: 17 (Octal) = 15 (Decimal)
o Decimal (Base-10): Common number system, uses 0–9.
o Hexadecimal (Base-16): Uses 0–9 and A–F. Example: 1F (Hex) = 31 (Decimal)
 Conversions:
o Binary to Decimal: Multiply each bit by 2^position and add.
 Example: 1101 = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13
o Decimal to Binary: Divide by 2 repeatedly and reverse the result.
 Example: 13 → 1101 (13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0
R1 → 1101)
o Hex to Binary: Replace each hex digit with its 4-bit binary equivalent.
 Example: A9 = 1010 1001
o Binary to Hex: Group 4 bits from right to left and convert each group.
 Example: 10101001 → A9
 1's and 2's Complement:
o 1's Complement: Flip the bits (0→1, 1→0)
 Example: 1010 → 0101
o 2's Complement: Add 1 to 1's complement
 Example: 0101 + 1 = 0110
 Used to represent negative binary numbers
 Boolean Algebra & Logic Gates:
o Basic Logic Gates:
 AND: A·B → True only if both A and B are 1
 OR: A + B → True if any input is 1
 NOT: ¬A → Inverts the input
o Universal Gates:
 NAND: NOT of AND
 NOR: NOT of OR

 XOR: A ⊕ B = 1 when inputs differ


o XOR/XNOR:

 XNOR: A ⊙ B = 1 when inputs are same


 Truth Tables:

A B AND OR XOR NAND NOR XNOR


0 0 0 0 0 1 1 1
0 1 0 1 1 1 0 0
1 0 0 1 1 1 0 0
1 1 1 1 0 0 0 1

 Basic Combinational Circuits:


o Half Adder:
 Adds two 1-bit numbers: A and B
 Outputs: Sum = A ⊕ B, Carry = A · B
 Truth Table:

A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

o Full Adder:

 Outputs: Sum = A ⊕ B ⊕ Cin, Carry = (A·B) + (B·Cin) + (A·Cin)


 Adds three 1-bit numbers: A, B, and Carry-in (Cin)

 Truth Table:

A B Cin Sum Cout


0 0 0 0 0
0 1 0 1 0
1 0 0 1 0
1 1 0 0 1
0 0 1 1 0
0 1 1 0 1
1 0 1 0 1
1 1 1 1 1

Diagrams: You can easily find visual diagrams for logic gates and adders online. Let me know if
you’d like embedded diagrams or hand-drawn versions.

You might also like