Chapter 2: Number System and Conversion

What is Number System?

  • Mathematical notation for representing numbers consistently.
  • Uses symbols/digits to express quantities and values.
  • Used in math, computing, engineering, etc.

Types of Number System:

  1. Non-positional Number System
    • Early counting used fingers, stones, or sticks.
    • Additive approach or non-positional system.
    • Symbols like I, II, III used for values.
    • Symbols added for total value.
    • Hard for arithmetic; led to positional systems.
    • Example: Roman Numeric

2. Positional Number System

    • Positional systems use digits with varying values.
    • Digit’s value is based on itself, position, and base.
    • Different systems based on base value:
          • Decimal
          • Binary
          • Octal
          • Hexadecimal

Radix of a Number System:

  • Radix of a number: Also called its base.
  • Represents the number of unique symbols in a number system.
  • Determines counting and positional structure.
  • Decimal system (base-10) has a radix of 10 (0 to 9).
  • Binary system (base-2) has a radix of 2 (0 and 1).
  • Hexadecimal system (base-16) has a radix of 16 (0-9 and A-F).
  • Radix influences mathematical operations and representation rules.

Why Binary number system is used in computer system?

  • Digital Nature: Computers operate using electronic components that have two stable states: “on” and “off,” corresponding to binary digits 1 and 0.
  • Simplicity: Binary representation aligns with the basic operation of electronic switches, like transistors, which can have two states.
  • Reliability: Binary states are distinct, making it easier to differentiate between them and accurately detect changes.
  • Efficiency: Binary arithmetic involves straightforward operations (addition, subtraction), which can be efficiently implemented using digital circuits.
  • Memory Cells: Computer memory cells store individual bits, aligning well with binary representation (0 or 1).
  • Compatibility: Binary representation allows seamless communication between computer components, such as processors, memory, and input/output devices.
  • Logical Operations: Binary logic gates (AND, OR, NOT) are essential for designing computer components and executing instructions.
  • Error Handling: Binary representation simplifies error detection and correction mechanisms, ensuring data integrity.
  • Encoding: Communication protocols use binary encoding for transmitting and storing data accurately.
  • Uniformity: Binary representation provides a standardized way to handle various tasks and data types consistently in computer systems.

Decimal/Binary/Octal/Hexadecimal Number System & Conversion

Decimal Number System:

  • Base-10 system.
  • Digits 0-9.
  • Positional: Each place represents power of 10.
  • Common for human calculations.

Binary Number System:

  • Binary system: 0 and 1.
  • Base-2 system, simplest due to two digits.
  • Binary digits called “Bits”.
  • 4 Bits = nibble, 8 Bits = byte.
  • Represents devices’ ON and OFF states.
  • Base value of binary is 2 (subscripted as B).
  • Example: (1010)2 or (1010)B.

Octal Number System:

  • Octal system: 8 digits – 0 to 7.
  • Base-8 system, simpler than binary.
  • Easier handling compared to binary arrays.
  • Octal array shorter than binary.
  • Base value of octal is 8 (subscripted as O).
  • Grouping bits for binary representation.
  • Used in some assembly languages for instructions and addresses.
  • Early computing systems with word sizes divisible by three.

Hexadecimal Number System:

  • Hexadecimal: 10 digits (0-9) and 6 letters (A-F).
  • A-F represent 10-15.
  • Base-16 system, used in microprocessors.
  • Different systems represent same quantities.
  • Symbols change, quantities stay constant.
  • Compact representation of binary data.
  • Common for memory addresses, debugging, and low-level programming.
  • Representing colors in graphics (HTML/CSS).
  • Network addresses (IPv6) and file formats.

 

 

 

 

Number System Conversion

Decimal to Other System Conversion

Conversion from decimal to binary

Rules:

  1. Divide the decimal number by the base value of binary (2) and list the remainder.
  2. The process is continuing till the quotient becomes zero.
  3. Write the remainders left to right from bottom to top.

Example:

Convert (34)10 into Binary.

Solution:

Given number: 34

Let’s convert it to binary:

 

 

 

 

 

 

 

∴ (34)10 = (100010)2

Fractional conversion (Decimal to Binary):

Rules:

  1. Successively multiply the fraction by 2 (base 2) to generate binary digits.
  2. Repeat until the fraction becomes 0 or until the desired accuracy is reached.
  3. If the fraction becomes 0, terminate the process.
  4. If the fraction does not become 0 after 5 iterations, terminate the process after the 5th iteration.

Example:

Convert (23.84)10 into Binary.

Solution:

Given number: 23.84

Let’s convert the non fractional part first:

 

 

 

 

 

 

∴ (23)10 = (10111)2

Now, let’s convert the fractional part:

 

 

 

 

 

∴ (.84)10 = (.11010)2

Finally,

(23)10 + (.84)10 = (10111)2 + (.11010)2 

∴ (23.84)10 = (10111.11010)2

Converting Decimal to Octal

Rules:

  1. Divide the decimal number by the base value of Octal (8) and list the remainder.
  2. The process is continuing till the quotient becomes zero.
  3. Write the remainders left to right from bottom to top.

Example: 

Convert the decimal number 109 into octal.

Solution:

Given number: 109

Let’s convert it to octal:

 

 

 

 

∴ (109)10 = (155)8

Fractional conversion (Decimal to Octal):

Rules:

  1. Successively multiply the fraction by 8 (base 8) to generate binary digits.
  2. Repeat until the fraction becomes 0 or until the desired accuracy is reached.
  3. If the fraction becomes 0, terminate the process.
  4. If the fraction does not become 0 after 5 iterations, terminate the process after the 5th iteration.

Example:

Convert (23.84)10 into Octal.

Solution:

Given number: 23.84

Let’s convert the non fractional part first:

 

 

 

 

∴ (23)10 = (27)8

Now, let’s convert the fractional part:

 

 

 

 

 

 

∴ (.84)10 = (.65605)8

Finally,

(23)10 + (.84)10 = (27)8 + (.65605)8 

∴ (23.84)10 = (27.65605)8

Converting Decimal to Hexadecimal

Rules:

  1. Divide the decimal number by 16 and list the remainder.
  2. The process is continuing till the quotient becomes zero.
  3. Write the remainders left to right from bottom to top.

Example: 

  1. Convert the decimal number 53 into Hexadecimal number.

Solution:

Given number: 53

Let’s convert it to octal:

 

 

 

 

∴ (53)10 = (35)16

Example: 

  1. Convert decimal number 235 into Hexadecimal number.

Solution:

Given number: 235

Let’s convert it to Hexadecimal:

 

 

 

 

Here, since it is hexadecimal values, we know:

14 = E

11 = B

∴ (235)10 = (EB)16

Fractional conversion (Decimal to Hexadecimal):

Rules:

  1. Successively multiply the fraction by 16 (base 16) to generate binary digits.
  2. Repeat until the fraction becomes 0 or until the desired accuracy is reached.
  3. If the fraction becomes 0, terminate the process.
  4. If the fraction does not become 0 after 5 iterations, terminate the process after the 5th iteration.

Example:

Solution:

Given number: 31.84

Let’s convert the non fractional part first:

 

 

 

 

Here, since it is hexadecimal values, we know:

15 = F

∴ (31)10 = (1F)16

Now, let’s convert the fractional part:

 

 

 

 

 

Here, since it is hexadecimal values, we know:

13 = D

10 = A

∴ (.84)10 = (.D70A3)16

Finally,

(31)10 + (.84)10 = (1F)16 + (.D70A3)16 

∴ (31.84)10 = (1F.D70A3)16

Other System to Decimal Conversion

Converting From Binary to Decimal

Rules:

  1. Multiply each binary digit with its place value i.e. positive powers of two with its positional weight.
  2. Add all the products.

Example: Convert Binary number 111111 into decimal no.

Given number: 11111

Let’s first find out positional weight for each binary digit:

 

 

 

Now, let’s convert: 

 = (1 × 25 + 1 × 24 + 1 × 23 + 1 × 22 + 1 × 21 + 1 × 20)

 = 32+16+8+4+2+1

 = 63

∴ (111111)2 = (63)10

Fractional conversion (Binary to Decimal):

Example:  Convert Binary number 110011.11into decimal no.

Given number: 110011.11

Let’s first find out positional weight for each binary digit:

 

 

 

 

Now, let’s convert: 

 = (1 × 25 + 1 × 24 + 1 × 23 + 1 × 22 + 1 × 21 + 1 × 20  + 1 × 2-1 + 1 × 2-2)

 = 32+16+0+0+2+1+0.5+0.25

 = 51.75

∴ (110011.11)2 = (51.75)10

Conversion from Octal to Decimal

Method:

  1. Multiply each octal digit with its place value (8) with its positional weight.
  2. Add all the products.

Example: Convert octal number 435 into Decimal number.

Given number: 435

Let’s first find out positional weight for each octal digit:

 

 

 

 

Now, let’s convert: 

= (4 × 82 + 3 × 81 + 5 × 80)

= (4 × 64 + 3 × 8 + 5 × 1)

= (256+24+5)

= 285

∴ (435)8 = (285)10

Fractional conversion (Octal to Decimal):

Solved examples of octal fractions to decimal fraction conversion

Example: Convert (21.21)8 into base 10

Given number: 21.21

Let’s first find out positional weight for each octal digit:

 

 

 

Now, let’s convert: 

= 2 × 81 + 1 × 80 + 2 × 8-1 + 1 x 8-2

= 2 × 8 + 1 × 1 + 2 × ( 1 / 8 ) + 1 × ( 1 / 64 )

= 16 + 1 + ( 0. 25 ) + ( 0.015625 )

= 17 + 0. 265625

 = 17.265625

∴ (21.21)8 = (17.265625)10

Conversion from Hexadecimal to Decimal

Method:

  1. Multiply each hexadecimal digit with its place value(16) with its positional weight.
  2. Add all the products.

Example: Convert hexadecimal number AB2 into decimal.

Given number: AB2 

Let’s first find out positional weight for each hexadecimal digit:

 

 

 

 

Here, since it is hexadecimal values, we know:

A = 10

B = 11

Now, let’s convert: 

(10 × 162 + 11 × 161 + 2 × 160 )

= (10 × 256 + 11 × 16 + 2 × 1)

= (2560 + 176 + 2) =2738

∴ (AB2)16 = (2738)10

Fractional conversion (Hexadecimal to Decimal):

Example: Convert ( E F . B 1 )16= ( ? )10

= E × 161 + F × 160 . B × 16-1 + 1 x 16-2

= 14 × 16 + 15 × 1 . 11 × ( 1 / 16 ) + 1 × ( 1 / 256 )

= 224 + 15 . ( 0. 6 8 7 5 ) + ( 0 . 0 0 3 9 0 6 2 5 )

= 239 + 0. 6914

= 239 . 691406

Therefore ( E F . B 1 )16 = ( 2 3 9 . 6 9 1 4 0 6 )10

Binary to Octal and Hexadecimal Conversion

Conversion from Binary to Octal

Method 1:

  1. Write the Binary number in group of 3 from right hand side.
  2. If any digits are inadequate for such group of 3, then add zeros before the number.
  3. Write its corresponding value of octal from the table or convert it to decimal as before.

Example: Convert Binary number 10110 into Octal.

Binary number: 10110

Grouped Binary Number: 010     110

Corresponding Octal Value: 2      6 [Taken from the table]

Or

Given number: 10110

Let’s first find out positional weight for each binary digit:

 

 

 

Now, let’s convert: 

 = ( 0 × 22 + 1 × 21 + 0 × 20)

 = 0+2+0

 = 2

Similarly,

 = ( 1 × 22 + 1 × 21 + 0 × 20)

 = 4+2+0

 = 6

Concatenating above results. We get:

∴ (10110 )2 = (26)8

Method -2:

  1. First convert the Binary number into Decimal number.
  2. Now convert the decimal number into Octal number.

Example: Convert Binary number 10110 into Octal.

Given number: 10110

Let’s first find out positional weight for each binary digit:

 

 

 

 

Now, let’s convert to decimal first: 

= (1 × 2 4 + 0 × 23 + 1 × 22 + 1 × 21 + 0 × 20)

= 16 + 0 + 4 + 2 + 0

= 22

Therefore, (10110)2 = (22)10

Again, let’s convert decimal to octal:

 

 

 

 

Therefore (22)10 = (26)8

∴ (10110)2  = (26)8

Fractional conversion (Binary to Octal):

Example: Convert (0110 011.1011)2 into base 8

Binary number = (0110 011.1011)2

Group of 3 bit of Binary = (0 110 011 . 101 1)2

= (110 011 . 101 100)2

 

 

 

Now, let’s convert: 

 = ( 1 × 22 + 1 × 21 + 0 × 20)

 = 4+2+0

 = 6

Similarly,

 = ( 0 × 22 + 1 × 21 + 1 × 20)

 = 0+2+1

 = 3

Similarly,

 = ( 1 × 22 + 0 × 21 + 1 × 20)

 = 4+0+1

 = 5

Similarly,

 = ( 1 × 22 + 0 × 21 + 0 × 20)

 = 4+0+0

 = 4

Concatenting above results. We get:

Thus, (0110 011.1011)2 = (63.54)8

∴ (0110 011.1011)2  = (63.54)8

 

Conversion from Binary to Hexadecimal

Method -1:

  1. Write the binary number in a group of 4 from right to left. 
  2. If any digits are inadequate for such a group 4, then add 0 before the number as much is necessary. 
  3. Write the equivalent Hexadecimal number from the table or convert binary to decimal as before.

Example: Convert Binary number 10110 into Hexadecimal.

Binary Number: 10110

Grouped Binary Number: 0001     0110

Equivalent Hexadecimal number:   1     6 [taken from the table]

Or

 

 

 

 

Now, let’s convert: 

 = ( 0 x 23  + 0 × 22 + 0 × 21 + 1 × 20)

 = 0+0+0+1

 = 1

Similarly,

 = ( 0 x 23  + 1 × 22 + 1 × 21 + 0 × 20)

 = 0+4+2+0

 = 6

Therefore, (10110) 2 = (16)16

 

Method -2:

  1. Convert the given binary number into Decimal number 
  2. Now convert decimal number into Hexadecimal number.

Example: Convert Binary number 10110 into Hexadecimal.

Let’s first find out positional weight for each binary digit:

 

 

 

 

Now, let’s convert to decimal first: 

= (1 × 2 4 + 0 × 23 + 1 × 22 + 1 × 21 + 0 × 20)

= 16 + 0 + 4 + 2 + 0

= 22

Therefore, (10110)2 = (22)10

Again, let’s convert decimal to octal:

 

 

 

 

Therefore (22)10 = (16)16

∴ (10110)2  = (16)16

Fractional conversion (Binary to Hexadecimal):

Method -1:

  1. Write the binary number in a group of 4 from right to left. 
  2. If any digits are inadequate for such a group 4, then add 0 before the number as much is necessary. 
  3. Write the equivalent Hexadecimal number from the table or convert binary to decimal as before.

Example: Convert (11110.01011)2 into Base 16

Binary Number: 11110.01011

Grouped Binary Number: 0001   1110   0101   1000

Equivalent Hexadecimal number:   1 14/E 5 8 [taken from the table]

∴  (11110..01011)2 =(1E.58)16

OR,

Binary number   = (11110..01011)2

Group of 4 bit of Binary = (0001 1110 . 0101 1000)2

 

 

 

Now, let’s convert: 

= (0 × 23 + 0 × 22 + 0 × 21 + 1× 20)

= 0 + 0 + 0 + 1

= 1

Similarly,

= (1 × 23 + 1 × 22 + 1 × 21 + 0 × 20)

= 8 + 4 + 2 + 0

= 14

= E

Similarly,

= (0 × 23 + 1 × 22 + 0 × 21 + 1 × 20)

= 0 + 4 + 0 + 1

= 5

Similarly,

= (1 × 23 + 0 × 22 + 0 × 21 + 0 × 20)

= 8 + 0 + 0 + 0

= 8

Concatenating above results. We get:

∴ (11110.01011)2 = (1E.58)16

Octal and Hexadecimal System to Binary Conversion

Conversion from Octal to Binary

Method – 1

  1. Write the equivalent 3 bits of binary number of octal from the table.

Example: Convert octal number 35 into Binary number.

Octal Number: 3 5

Equivalent Binary number: 011 101 [taken from the table]

Therefore, (35)8 = (011101)2

Method -2:

  1. First convert octal number into Decimal number.
  2. Now convert Decimal number into Binary number.

Example: Convert octal number 35 into Binary number.

Octal number: 3 5

Positional weight: 1 0

Conversion: = (3 × 81 + 5 × 80)

= 24+5

Therefore, (35)8 = (29)10

 

 

 

 

 

 

 

Thus, (35)8 = (11101)2

Conversion from Hexadecimal to Binary

Method – 1

  1. Convert the Binary number in the group of 4 bits for each hexadecimal number.
  2. Provide base 2 to the result.

Example: Convert Hexadecimal number A2C into Binary.

Hexadecimal Number: A 2 C

Equivalent Binary Number 1010 0010 1100

Therefore, (A2C)16 = (1010 0010 1100)2

Method – 2

  1. First convert the Hexadecimal number into decimal.
  2. Then convert the decimal number into a Binary number.

Hexadecimal Number: A 2 C

Positional weight: 2 1 0

Conversion: = (10 × 162 + 2 × 161 + 12 × 160)

(A=10, C=12 taken from the table)

= (10 × 256 + 2 × 16 + 12 × 1)

= (2560+32+12) = 2604

Therefore, (A2C)16 = (2604)10

 

 

 

 

 

 

 

 

 

 

 

 

Fractional conversion (Hexadecimal to Binary):

Octal to Hexadecimal Conversion and Vice Versa

Conversion from Octal to Hexadecimal

Method-1:

  1. Convert each octal digit into 3 bit of binary equivalent.
  1. Now, form the group of 4 digits of binary numbers from right hand side.
  2. Write the equivalent Hexadecimal value from the given table.

Example: Convert octal number 420 into Hexadecimal number.

Octal Number: 4 2 0

3 Bit of Binary equivalent: 100 010 000

Group of 4 bit of Binary digits 0001 0001 0000

Equivalent Hexadecimal number: 1 1   0

Thus, (420)8 = (110)16

Method -2:

  1. First convert octal number into Decimal number.
  2. Now convert Decimal number into Hexadecimal number.

 

 

 

 

 

 

 

 

 

 

Conversion from Hexadecimal to Octal

Method -1

  1. Convert each hexadecimal number into 4 bit of binary equivalent. 
  2. Then form the group of 3 bits of binary digits from right hand side.
  3. If any digits are inadequate for such group of 3, then add zero before the number.
  4. Now, write the equivalent octal value for each group from the table.

Example: Convert Hexadecimal number 183 into Octal.

Hexadecimal number: 1 8 3

4 bits of Binary equivalent 0001 1000 0011

3 bits of Binary grouping 000 110 000 011

Equivalent octal number   0   6   0   3

Hence, (183)16 = (603)8

Method – 2

  1. First convert Hexadecimal number into decimal number
  2. Then convert decimal number into octal number.

Hexadecimal number: 1 8 3

Positional weight: 2 1 0

Conversion: = (1 × 162 + 8 × 161 + 3 × 160)

= (256+128+3) 

= 387

Thus, (183)16 = (387)10

 

 

 

 

 

 

 

Fractional conversion (Hexadecimal to Octal):

 Binary Calculations

  • Uses 0 and 1 digits.
  • Arithmetic operations yield results in 0s and 1s.
Binary Addition

 

 

 

 

 

 

 

 

 

 

 

 

Binary Subtraction

 

 

 

 

 

Note: Borrowing is necessary when we have to subtract a larger number from a smaller one. A borrow will cause a 1 in the minuend to become 0 and a 0 to become 1. In the second case the preceding 0s in the minuend are changed to 1s until a 1 can be changed to a 0.

 

 

 

 

 

Binary Multiplication

 

 

 

 

 

 

 

 

 

 

 

 

Binary Division

 

 

 

 

 

 

 

Binary division guidelines:

  • Subtract divisor from dividend.
  • If subtracting is possible, quotient digit is 1 and subtract.
  • If not possible, quotient digit is 0.
  • Bring down next dividend digits to continue.
  • Repeat until divisor is smaller than dividend.

 

 

 

 

 

 

 One’s and Two’s Complement Method for Binary Subtraction 

1’s complement method for binary subtraction

Methods for binary subtracting by using 1’s complement.

  1. Make equal no. of bits by placing 0 in front of negative number to make equal with the first number.
  2. Convert 1’s complement of the second number i.e. 1 to 0 and 0 to 1
  3. Add it to the main value.
  4. If an overflow bit occurs, remove it and add it to the remaining number.
  5. If there is not extra bit, find 1’s complement of result in step 2 and add (-ve) sign.

Example: Subtract 11 from 100 by using 1’s complement.

 

 

 

 

 

 

 

2’s complement method for binary subtraction

Methods for binary subtracting by using 2’s complement

  1. Make equal no. of bits by placing 0 in front of negative number to make equal with first number.
  2. Convert 1’s complement of the second number i.e. 1 to 0 and 0 to 1 and adding 1 to inverted value.
  3. Add it to the main value.
  4. If overflow bit occurs, remove it and the remaining is answer.
  5. If there is no extra bit, find 2’s complement of result in step 2 and add (-ve) sign.

Example: Subtract 11 from 100 by using 1’s complement.

 

 

 

 

 

 

 

 Logic Function & Boolean Algebra

  • George Boole: Born 1815, Lincoln, England; Died 1864, Cork, Ireland.
  • Book “The Laws of Thought” (1854) explained human reasoning.
  • Introduced practical mathematics of logic.
  • Boolean reduction simplifies complex logical relationships.
  • Used in digital circuit design for devices.
 Introduction to Boolean Algebra
  • Foundation of modern digital electronics.
  • Boolean algebra for logical relationships and binary variables.
  • Used in logical circuit design and analysis.
  • Rules for symbolic manipulation by Boole.
  • True/false outcomes, used in digital logic.
  • AND, OR, NOT gate operations fundamental.

Unique feature of Boolean Algebra:

  1. Boolean algebra: 0 and 1 values.
  2. No subtraction, division; only logical addition, multiplication.
  3. Unique laws: A + A = A, A . A = A.
  4. Distributive law: A + (B.C) = (A+B).(A+C).
  5. Graphical methods specific to Boolean algebra.

 Introduction to Boolean Values, Truth Table, Boolean Expression and Boolean Function

Truth Table
  • Truth table shows input-output relationships.
  • Represents input combinations in binary.
  • Uses Boolean operations.
  • Example: A, B input; C output.
  • Shows all possible combinations.

 

 

 

 

 

Boolean Expression or Functions
  • Boolean expression: Represents logic using symbols.
  • Consists of variables, operations (AND, OR, NOT).
  • Describes the logic relationship between variables.
  • Translated into truth tables or simplified.
  • Used in digital logic design.
  • Some Example are:
    • F 1= AB + B’
    • F2 = AB’C
  • The function F = 1 when the value of A = 0, B = 0 and C = 1, otherwise F = 0. The Boolean functions can also be represented in a truth table. To represent a Boolean function in a truth table, we need a list of the possible combinations of binary 0 and 1, the combination is formed by 2n where n is the number of binary variables. Above function is illustrated in the following truth table.

 

 

 

 

 

 

  • The Boolean functions may be represented from an algebraic expression into a logic diagram, which is composed of different logic gates: AND, OR, NOT, etc. The above Boolean function is represented with logic diagram as:

 

 

 

 

 

 

Basic Logical/Boolean Operation
  • Three basic Boolean operations: OR, AND, NOT.
  • Operate on binary values 0 and 1.
  • Binary variables hold 0 or 1.
  • Essential operations in Boolean algebra.

AND Operation

  • Denoted by . or AND.
  • Binary operation, works on 2 or more variables.
  • Input: Binary variables X and Y.
  • Output: Binary variable Z.
  • Logical equation: z = x . y.

 

 

 

 

 

 

  • Above table illustrates that the output is 1 (TRUE) if all of the given input is 1 (TRUE), otherwise it provides 0 (FALSE) result.

OR Operation

  • Denoted by + or OR.
  • Binary operation, works on 2 or more variables.
  • Input: Binary variables X and Y.
  • Output: Binary variable Z.
  • Logical equation: z = x + y.

 

 

 

 

 

 

 

  • Above table illustrates that the output is 1 (TRUE) if one of the given input is 1 (TRUE), it provides a 0 (FALSE) result if all the given inputs are 0 (FALSE).

NOT operation

  • The NOT operation is denoted by bar ( ), prime (‘) or tilde (~). The logical equation of NOT operation is shown as:

 

 

 

 

 

Logic Gate

  • Core of digital systems.
  • Electronic circuits with inputs and one output.
  • Represented by graphical symbols.
  • Interpret logical values, produce logical outputs.
  • Essential components in digital design.
  • Include basic gates with distinct functions.

 

 

 

 

 

AND Gate

  • Multiple inputs, one output.
  • Performs AND operation (logical multiplication).
  • TRUE output if all inputs are TRUE.
  • FALSE output if any input is FALSE.
  • Boolean expression: F = A . B.
  • The symbol used for the AND gate, truth table and the Venn-diagram is shown in the following figure.

 

 

 

 

 

OR Gate 

  • Multiple inputs, one output.
  • Performs OR operation (logical addition).
  • TRUE output if any input is TRUE.
  • FALSE output if all inputs are FALSE.
  • Boolean expression: F = A + B.
  • The symbol used for the OR gate, truth table and the Venn-diagram is shown in the following figure.

 

 

 

 

 

 

NOT Gate

  • One input, one output (unary gate).
  • Performs NOT operation (logical complement).
  • TRUE output if input is FALSE, and vice versa.
  • Boolean expression: F = A’.
  • The symbol used for the NOT gate, truth table and the Venn-diagram is shown in the following figure.

 

 

 

 

 

NAND Gate

  • Complement of AND gate.
  • Multiple inputs, one output.
  • Output is complement of AND operation.
  • Boolean expression: F = (A . B)’.
  • The symbol used for the NAND gate, truth table and the Venn-diagram is shown in following figure.

 

 

 

 

 

NOR Gate

  • Complement of OR gate.
  • Produces TRUE if all inputs are TRUE.
  • Produces FALSE if any input is TRUE.
  • Boolean expression: F = (A + B)’.
  • The symbol used for the NOR gate, truth table and the Venn-diagram is shown in the following figure.

 

 

 

 

 

 

X-OR Gate

  • XOR gate: Two inputs, one output.
  • TRUE output when inputs are different.
  • FALSE output when inputs are the same.
  • Boolean expressions: F = A’B + AB’ or F = A ⊕ B.
  • The symbol used for the AND gate, truth table and the Venn-diagram is shown in the following figure.

 

 

 

 

 

 

X-NOR Gate

  • XNOR gate: Complement of XOR gate.
  • TRUE output when inputs are both 0 or both 1.
  • FALSE output when inputs are different.
  • Algebraic expressions: F = AB + A’B’ or F = A ⊙ B.
  • The symbol used for the AND gate, truth table and the Venn-diagram is shown in the following figure.

 

 

 

 

 

Universal Gate

NAND gate as Universal gate:

  • NAND and OR gates: Universal gates.
  • NAND gates can replace other gates.
  • NAND gates can realise AND, OR, NOT operations.
  • NAND gate is versatile and widely used.
  • demonstrated in the following diagram.

 

 

 

 

 

 

 

 

 

NOR gate as universal gate:

  • NOR gate: Another universal gate.
  • Can implement AND, OR, NOT functions.
  • NOR gates replace other gates.
  • NOR gate is versatile and universal.
  • The figure below shows how the NOR gate can be used as NOT gate

All NOR input pins connected to the input signal A give an output A’.

 

 

 

 

The figure below shows how the NOR gate can be used as OR gate.

An OR gate can be replaced by NOR gates as shown in the figure. The OR is replaced by a NOR gate with its output complemented by a NOR gate inverter.

 

 

 

 

The figure below show how the NOR gate can be used as AND gate.

An AND gate can be replaced by NOR gates as shown in the figure. The AND gate is replaced by a NOR gate with all its inputs complemented by NOR gate inverters.

 

 

 

 

 

 

 

Laws of Boolean Algebra

Duality Principle
  • Replacing AND(.) with OR(+) and vice versa.
  • 1 with 0, vice versa keeps variable and complements and variable unchanged.

For example:

Let us consider a Boolean expression

F = A + B . 0

Then it’s duality would be

FD = A . B + 1

And both expressions will be the same. It would be verified by the following truth table.

 

 

 

 

 

 

Boolean Postulates
  • Rules no needs to verify.

 

 

 

 

 

Laws of Boolean Algebra
  1. Identify Laws

                        A + 0 = A                                        A . 1 = A

  2. Complement Laws

                        A + A’ = 1                                        A . A’ = 0

   3. Idempotent Laws

                       A + A = A                                        A. A = A

   4. Bounded Laws

                       A + 1 = 1                                          A . 0 = 0

   5. Absorption Laws

                      A + (A . B) = A                                A. (A + B) = A

   6. Commutative Laws

                     A + B = B + A                                  A . B = B . A

   7. Associative Laws

                    (A + B) + C = A + (B + C)             (A B) C = A (B C)

   8. Distributive Laws

                   A (B + C) = A B + A C                     A + (B C) = (A + B) (A + C)

  9. Involution Laws

                  (A’)’= A

10. De Morgan’s Laws

                 (A + B)’ = A’.B’                                (A.B)’ =A’+B’

 

Statement and Verification of Laws of Boolean  Algebra using Truth Table

Identity Law

These laws state that combining a Boolean variable with its complement (negation) results in the original variable.

(a) A + 0 = A

(b)  A . 1 = A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Complement Law

This law states that the sum of a Boolean variable and its complement is always equal to 1.

(a)  A + A’ = 1

(b) A . A’ = 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Commutative Law

These laws state that the order of variables in an operation doesn’t affect the result.

(a) A + B = B + A

(b) A . B = B . A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Associative Law

These laws state that the grouping of variables in an operation doesn’t affect the result.

(a) A + (B + C)=(A + B) + C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The above table shows that (A + B) + C = A + (B + C) is equal for all possible combinations of inputs.

(b) A.(B.C)=(A.B).C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Distributive Law

These laws relate the operations of addition and multiplication.

(a) A (B + C) = A B + A C

 

 

 

 

 

 

 

 

 

 

The above table shows that A . ( B + C) = (A . B) + (A . C) is equal for all possible combinations of inputs.

(b) A + (B C) = (A + B) (A + C)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DeMoragan’s Theorem

  • Complement of OR is equivalent to AND of complements: ¬(A OR B) = ¬A AND ¬B
  • Complement of AND is equivalent to OR of complements: ¬(A AND B) = ¬A OR ¬B
  • Useful for Boolean expression simplification. Applies to binary variables.

Theorem 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The above table shows that (A+B)’ = A’.B’ is equal for all possible combinations of inputs. Let us see: when the value of A = 0 and B = 0, the value of (A+B)’ = 1 and A’.B’ = 1. Similarly we can see all the combinations of A and B, all the time (A+B)’ = A’.B’ are equal.

Theorem 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The above table shows that (A.B)’ = A’+B’ is equal for all possible combination of inputs. Let us see: when the value of A = 0 and B = 0, the value of (A.B)’ = 1 and A’.B’ = 1. Similarly we can see all the combinations of A and B, all the time (A.B)’ = A’+B’ are equal.

Simplification of Boolean Expression

  • Apply algebraic rules.
  • Combine terms and eliminate redundancies.
  • Complex Boolean expressions can be simplified using Boolean algebra.
  • Difference laws of Boolean algebra are applied for simplification.
  • Simplification aids logic circuit design.
  • Reduces complexity and cost of circuits.