Boolean Logic & Number Systems

July 17, 2025
8 views
0 comments
Boolean Logic & Number Systems

3.1 Introduction

Computers operate using digital electronic circuits that can only recognize two states: high voltage (representing 1) and low voltage (representing 0). This binary nature means all data and instructions must be represented using just these two digits. This chapter explores the mathematical foundation of this binary system, known as Boolean Logic, and the different Number Systems used to represent data.

3.2 Boolean Logic

Boolean Logic, named after its creator George Boole, is a system of algebraic logic where variables can only have two values: True (1) or False (0). It is the fundamental principle behind the design of all digital circuits.

a) Logic Gates A logic gate is a physical device (or a logical model) that performs a single Boolean operation. It takes one or more binary inputs and produces a single binary output.

  • NOT Gate (Inverter)
    • Function: Reverses the input logic state. A 1 becomes a 0, and a 0 becomes a 1. It has only one input and one output.
    • Boolean Expression: Y = A' or Y = Ā
    • Symbol & Truth Table:
Input (A)Output (Y)
01
10
  • AND Gate
    • Function: The output is 1 only if all of its inputs are 1. Think of it as multiplication.
    • Boolean Expression: Y = A . B
    • Symbol & Truth Table (2-input):
Input AInput BOutput (Y)
000
010
100
111
  • OR Gate
    • Function: The output is 1 if at least one of its inputs is 1. Think of it as addition (where 1+1=1).
    • Boolean Expression: Y = A + B
    • Symbol & Truth Table (2-input):
Input AInput BOutput (Y)
000
011
101
111
  • NAND Gate (NOT-AND)
    • Function: The opposite of an AND gate. The output is 0 only when all inputs are 1.
    • Boolean Expression: Y = (A . B)'
    • Symbol & Truth Table (2-input):
Input AInput BOutput (Y)
001
011
101
110
  • NOR Gate (NOT-OR)
    • Function: The opposite of an OR gate. The output is 1 only when all inputs are 0.
    • Boolean Expression: Y = (A + B)'
    • Symbol & Truth Table (2-input):
Input AInput BOutput (Y)
001
010
100
110
  • XOR Gate (Exclusive-OR)
    • Function: The output is 1 only if the inputs are different. It's often called the "odd-1s detector".
    • Boolean Expression: Y = A ⊕ B
    • Symbol & Truth Table (2-input):
Input AInput BOutput (Y)
000
011
101
110

b) Logic Circuits Logic circuits are created by combining multiple logic gates to perform more complex tasks. For example, adding two binary numbers requires a combination of XOR and AND gates.

c) De Morgan's Laws De Morgan's laws provide a mathematical way to simplify and manipulate Boolean expressions, which is crucial for designing efficient digital circuits.

  1. First Law: The complement of a sum is equal to the product of the complements.
    • Formula: ==(A + B)' = A' . B'
  2. Second Law: The complement of a product is equal to the sum of the complements.
    • Formula: (A . B)' = A' + B'==

These laws essentially state that you can "break the bar and change the sign" (from + to . or vice-versa).

3.3 Number Systems

A number system defines a set of values to represent quantity. The base or radix of a number system is the number of digits it uses.

  • Decimal (Base 10): Uses 10 digits (0-9).
  • Binary (Base 2): Uses 2 digits (0, 1).
  • Octal (Base 8): Uses 8 digits (0-7).
  • Hexadecimal (Base 16): Uses 16 symbols (0-9, A, B, C, D, E, F).

Conversion Between Number Systems

a) Decimal to Other Bases (Binary, Octal, Hexadecimal)

  • Method: Use repeated division by the target base. Collect the remainders in reverse order (bottom to top).

  • Example: Convert (68)₁₀ to Binary (Base 2)

    • 68 / 2 = 34 Remainder 0
    • 34 / 2 = 17 Remainder 0
    • 17 / 2 = 8 Remainder 1
    • 8 / 2 = 4 Remainder 0
    • 4 / 2 = 2 Remainder 0
    • 2 / 2 = 1 Remainder 0
    • 1 / 2 = 0 Remainder 1
    • Answer (reading up): (1000100)₂

b) Other Bases to Decimal

  • Method: Use the positional value or weighted multiplication method. Multiply each digit by its positional weight (base^position) and sum the results.

  • Example: Convert (1000100)₂ to Decimal (Base 10)

    • Digits: 1 0 0 0 1 0 0
    • Positions: 6 5 4 3 2 1 0
    • Calculation: (12⁶) + (02⁵) + (02⁴) + (02³) + (12²) + (02¹) + (0*2⁰)
    • == = 64 + 0 + 0 + 0 + 4 + 0 + 0 = 68 ==
    • Answer: (68)₁₀
  • Example: Convert (3B)₁₆ to Decimal (Base 10) (Remember B=11)

    • Digits: 3 B
    • Positions: 1 0
    • Calculation: == (3 * 16¹) + (11 * 16⁰) = 48 + 11 = 59==
    • Answer: (59)₁₀

c) Shortcut Conversions (Between Binary, Octal, and Hexadecimal) These shortcuts work because the bases (8 and 16) are powers of 2.

  • Binary to Octal: Group binary digits into sets of three from the right.

    • Example: (11010111)₂` -> `011` `010` `111` -> `3` `2` `7` -> **(327)₈**
  • Octal to Binary: Convert each octal digit into its 3-bit binary equivalent.

    • Example: (327)₈` -> `3` `2` `7` -> `011` `010` `111` -> **(11010111)₂**
  • Binary to Hexadecimal: Group binary digits into sets of four from the right.

    • Example: (11010111)₂` -> `1101` `0111` -> `D` `7` -> **(D7)₁₆**
  • Hexadecimal to Binary: Convert each hexadecimal digit into its 4-bit binary equivalent.

    • Example: (D7)₁₆` -> `D` `7` -> `1101` `0111` -> **(11010111)₂**
  • Octal to Hexadecimal (and vice-versa): The easiest way is to convert to binary as an intermediate step.

    • Example: (327)₈` -> `(011010111)₂` -> `(0001 1010 111?)` no, let's restart -> `(327)₈` -> `(011 010 111)₂` -> `(11010111)₂`. Now group by four: `(1101 0111)₂` -> `(D7)₁₆`.

Arbind Singh

Teacher, Software developer

Innovative educator and tech enthusiast dedicated to empowering students through robotics, programming, and digital tools.

Comments (0)

You need to be signed in to post a comment.

Sign In

No comments yet

Be the first to share your thoughts and insights about this note!

Note Stats

Views8
Comments0
PublishedJuly 17, 2025

Related Notes

Introduction to Computer Science

Class 11 • Computer Science

Python Programming Basics

Class 12 • Computer Science

Database Management Systems

Class 12 • Informatics Practices

Part of Course

Foundations of Computer Science and Python Programming (CBSE Class XI - 083)

Price
Free
Boolean Logic & Number Systems | StudyVatika Notes