Unit 2 - Language of Bits and Boolean logic
CBSE Revision Notes
Class-11 Computer Science (New Syllabus)
Unit 2: Computer Systems and Organisation (CSO)
Language of Bits and Boolean logic
Language of Bits
Data on hard disk is basically stored in bits 0’s and 1’s. We have different measures to calculate the size of a disk or memory and it starts with a bit.
8 bits= 1 Byte.
1024 Bytes= 1 Kilobyte (KB)
1024 KB= 1 MegaByte (MB)
1024 MB= 1 GigaByte (GB)
1024 GB= 1 TeraByte (TB)
1024 TB= 1 PetaByte (PB)
1024 PB= 1 ExaByte (EB)
Boolean logic
Binary logic deals with variables that take on two discrete values and with operations that assume logical meaning. The two values the variables assume may be called by different names (true and false, yes and no, etc.), but for our purpose, it is convenient to think in terms of bits and assign the values 1 and 0.
- AND: This operation is represented by a dot or by the absence of an operator. For example, x * y = z or xy = z is read “x AND y is equal to z.” The logical operation
AND is interpreted to mean that z = 1 if and only if x = 1 and y = 1; otherwise z = 0. (Remember that x, y, and z are binary variables and can be equal either to 1 or 0, and nothing else.) The result of the operation x * y is z.
Truth TableX Y X*Y 0 0 0 0 1 0 1 0 0 1 1 1 - OR: This operation is represented by a plus sign. For example, x + y = z is read “x OR y is equal to z,” meaning that z = 1 if x = 1 or if y = 1 or if both x = 1 and y = 1. If both x = 0 and y = 0, then z = 0.
Truth TableX Y X+Y 0 0 0 0 1 1 1 0 1 1 1 1 - NOT: This operation is represented by a prime (sometimes by an over bar). For example, x’ = z is read “not x is equal to z,” meaning that z is what x is not. In other words, if x = 1, then z = 0, but if x = 0, then z = 1. The NOT operation is also referred to as the complement operation, since it changes a 1 to 0 and a 0 to 1, i.e., the result of complementing 1 is 0, and vice versa.
Truth Table:X X’ 0 1 1 0 - Nor: The NOR gate operates as an OR gate followed by an inverter or NOT. Its output is "1" if both inputs are "0." Otherwise, the output is "0". It’s represented as x↓y. to understand it better you can understand NOR with this function (x+y)’ first do OR operation and then apply NOT operation
Truth Table
OrX Y X↓Y 0 0 1 0 1 0 1 0 0 1 1 0 X Y X+Y (X+Y)’ 0 0 0 1 0 1 1 0 1 0 1 0 1 1 1 0 - NAND: The NAND gate operates as an AND operation followed by a NOT operation. The output is "0" if both inputs are "1." Otherwise, the output is "1." It’s represented as x↑y. to understand it better you can understand NAND with this function (x*y)’ first do AND operation and then apply NOT operation
Truth Table
OrX Y X↑Y 0 0 1 0 1 1 1 0 1 1 1 0 X Y X*Y (X*Y)’ 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 - XOR: The XOR (exclusive-OR) gate acts in the same way as the logical "either/or." The output is "1" if either, but not both, of the inputs are "1." The output is "0" if both inputs are "0" or if both inputs are "1". It’s represented as x ⊕ y. or you can understand it with this function XY’ + X’Y
Truth Table
OrX Y X⊕Y 0 0 0 0 1 1 1 0 1 1 1 0
De Morgan’s law: De Morgan has suggested two theorems which are extremely useful in Boolean Algebra. The two theorems are discussed below.X Y X’ Y’ XY’ X’Y XY’+X’Y 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0
Theorem 1: (X*Y)’= X’+Y’
The left hand side (LHS) of this theorem represents a NAND gate with inputs X and Y, whereas the right hand side (RHS) of the theorem represents an OR gate with inverted inputs.
Truth Table
Theorem 2: (X+Y)’=X’*Y’X Y X’ Y’ X*Y (X*Y)’ X’+Y’ 0 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 1 0 1 1 1 1 0 0 1 0 0
The LHS of this theorem represents a NOR gate with inputs A and B, whereas the RHS represents an AND gate with inverted inputs.
Truth TableX Y X’ Y’ X+Y (X+Y)’ X’*Y’ 0 0 1 1 0 1 1 0 1 1 0 1 0 0 1 0 0 1 1 0 0 1 1 0 0 1 0 0