lesson 1_introduction of computer engineering.pptx

SarojaniRathnasekara1 6 views 48 slides Sep 16, 2025
Slide 1
Slide 1 of 48
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48

About This Presentation

Basic introduction about computer Engineering


Slide Content

Introduction to computer engineering H.S. Sarojani ( B.Tec in MMW, PGDE, NCOE dip in ICT, MSc® ) NCOET Kuliyapitiya BHED- AC- I02

Subject: Introduction to computer engineering Lecture 01 Contents: truth tables and principles of Boolean Algebra- Introduction to the basic gates, Information Representation Abstraction Layers in Computer Systems Design Introduction to the lab kits(Assignment for that students become familiar with the components in the lab kit by implementing two simple circuits)

Boolean algebra and Logic Gates Basic definition of Boolean Algebra Definition: Boolean algebra is a branch of algebra that deals with variables that have two possible values: true (1) and false (0). It provides a mathematical framework for analyzing and simplifying logical expressions.  

Basic Theory of Boolean Algebra 1. Boolean Variables: Boolean algebra consists of variables that can take on the values of true (1) or false (0). 2. Boolean Functions: A Boolean function is a mathematical expression formed using Boolean variables and logical operations. It produces a Boolean output based on the input values. 3. Representation: Boolean functions can be represented in several ways, including: Algebraic Form:  Using Boolean expressions (e.g., F(A,B)=A⋅B+¬AF(A, B) = A \ cdot B + \neg AF(A,B)=A⋅B+¬A). Truth Tables:  A table that lists all possible combinations of input values and the corresponding output values.

LAWS AND RULES OF BOOLEAN ALGEBRA ■ Commutative Laws A+B = B+A The commutative law of addition for two variables is written as A+B = B+A This law states that the order in which the variables are ORed makes no difference. Remember, in Boolean algebra as applied to logic circuits, addition and the OR operation are the same.

LAWS AND RULES OF BOOLEAN ALGEBRA ■ Commutative Laws A.B = B.A The commutative law of multiplication for two variables is A.B = B.A This law states that the order in which the variables are ANDed makes no difference. Here il1ustrates this law as applied to the AND gate.

LAWS AND RULES OF BOOLEAN ALGEBRA ■ Associative Laws : A + (B + C) = (A + B) + C The associative law of addition is written as follows for three variables: A + (B + C) = (A + B) + C This law states that when ORing more than two variables, the result is the same regardless of the grouping of the variables.

LAWS AND RULES OF BOOLEAN ALGEBRA ■ Associative Laws : A(BC) = (AB)C The associative law of multiplication is written as follows for three variables: A(BC) = (AB)C This law states that it makes no difference in what order the variables are grouped when ANDing more than two variables.

LAWS AND RULES OF BOOLEAN ALGEBRA ■ Distributive Law : A(B + C) = AB + AC The distributive law is written for three variables as follows: A(B + C) = AB + AC This law states that ORing two or more variables and then ANDing the result with a single variable is equivalent to ANDing the single variable with each of the two or more variables and then ORing the products. The distributive law also expresses the process of factoring in which the common variable A is factored out of the product terms, for example, AB + AC = A(B + C).

LAWS AND RULES OF BOOLEAN ALGEBRA ■ Rules of Boolean Algebra 12 basic rules that are useful in manipulating and simplifying Boolean expressions. Rules 1 through 9 will be viewed in terms of their application to logic gates. Rules 10 through 12 will be derived in terms of the simpler rules and the laws previously discussed.

LAWS AND RULES OF BOOLEAN ALGEBRA S.No . Name of the Postulates Postulate Equation 1 Law of Identity A + 0 = 0 + A = A A . 1 = 1 . A = A 2 Commutative Law (A + B) = (B + A) (A . B) = (B . A) 3 Distributive Law A . (B + C) = (A . B) + (A . C) A + (B . C) = (A + B) . (A + C) 4 Associative Law A + (B + C) = (A + B) + C (A . B) . C = A . (B . C) 5 Complement Law A + A’ = 1 A . A’ = 0 Postulates of Boolean Algebra

LAWS AND RULES OF BOOLEAN ALGEBRA S.No Theorem Statement Equations 1 Duality Theorem A boolean relation can be derived from another boolean relation by changing OR sign to AND sign and vice versa and complementing the 0s and 1s. A + A’ = 1 and A . A’ = 0 are the dual relations. 2 DeMorgan’s Theorem 1 Complement of a product is equal to the sum of its complement. (A . B)’ = A’ + B’ 3 DeMorgan’s Theorem 2 Complement of a sum is equal to the product of the complement. (A + B)’ = A’ . B’ 4 Idempotency Theorem – A + A = A A . A = A 5 Involution Theorem – A” = A 6 Absorption Theorem – A + (A . B) = A A . (A + B) = A Theorems of Boolean Algebra

LAWS AND RULES OF BOOLEAN ALGEBRA Theorems of Boolean Algebra 7 Associative Theorem – A + (B + C) = (A + B) + C A . (B . C) = (A . B) . C 8 Consensus Theorem – AB + A’C + BC = AB + A’C (A + B) + (A’ + C) + (B + C) = (A + B) + (A’ + C) 9 Uniting Theorem – AB + AB’ = A (A+B) + (A + B’) = A 10 Other theorems – A + 1 = 1 A . 0 = 0 11 Other theorems – A + (A’ . B) = A + B A . (A’ + B) = A . B

LAWS AND RULES OF BOOLEAN ALGEBRA ■ DeMorgan , a mathematician who knew Boole, proposed two theorems that are an important part of Boolean algebra. In practical terms. DeMorgan's theorems provide mathematical verification of the equivalency of the NAND and negative-OR gates and the equivalency of the NOR and negative-AND gates, which were discussed in part 3. One of DeMorgan's theorems is stated as follows: The complement of a product of variables is equal to the sum of the complements of the variables, Stated another way, The complement of two or more ANDed variables is equivalent to the OR of the complements of the individual variables. The formula for expressing this theorem for two variables is XY = X + Y DeMorgan’s theorem

LAWS AND RULES OF BOOLEAN ALGEBRA ■ DeMorgan’s theorem DeMorgan's second theorem is stated as follows: The complement of a sum of variables is equal to the product of the complements of the variables. Stated another way, The complement of two or more ORed variables is equivalent to the AND of the complements of the individual variables, The formula for expressing this theorem for two variables is X + Y = X Y

Example Apply DeMorgan's theorems to each of the following expressions: (a) (A + B + C)D (b) ABC + DEF (c) AB + CD + EF

Logical Operations & Logic gates Various operations are used in Boolean algebra, but the basic operations that form the base of Boolean Algebra are: • Negation or NOT Operation • Conjunction or AND Operation • Disjunction or OR Operation     

Negation or NOT Operation Using the  NOT  operation reverse the value of the Boolean variable from 0 to 1 or vice-versa. This can be understood as: If A = 1, then using NOT operation we have (A)' = 0 If A = 0, then using the NOT operation we have (A)' = 1 We also represent the negation operation as ~A, i.e if A = 1, ~A = 0 Conjunction or AND Operation Using the  AND  operation satisfies the condition if both the values of the individual variables are true, and if any of the values is false, then this operation gives a negative result. This can be understood as, If A = True, B = True, then A . B = True If A = True, B = False, Or A = false, B = True, then A . B = False If A = False, B = False, then A . B = False

Disjunction (OR) Operation Using the  OR  operation satisfies the condition if any value of the individual variables is true; it only gives a negative result if both the values are false. This can be understood as, If A = True, B = True, then A + B = True If A = True, B = False, Or A = false, B = True, then A + B = True If A = False, B = False, then A + B = False

Operation Symbol Definition AND Operation ⋅ or ∧ Returns true only if both inputs are true. OR Operation + or ∨ Returns true if at least one input is true. NOT Operation ¬ or ∼ Reverses the input. XOR Operation ⊕ Returns true if exactly odd number of inputs are true. NAND Operation ↓ Returns false only if both inputs are true. NOR Operation ↑ Returns false if at least one input is true. XNOR Operation ↔ Returns true if both inputs are equal. Boolean Algebra Table (Extended)

Once the Boolean expression for a given logic circuit has been determined, a truth table that shows the output for all possible values of the input variables can be developed. The procedure requires that you evaluate the Boolean expression for all possible combinations of values for the input variables. Constructing a Truth Table and Logic Circuit Truth Table

Constructing a Truth Table and Logic Circuit Truth Table Boolean function can be represented in a truth table. • Truth table has 2 n rows where n is the number of variables in the function. • The binary combinations for the truth table are obtained from the binary numbers by counting from 0 through 2n - 1.

Constructing a Truth Table and Logic Circuit (a) (A + B + C)A (b) ABC + ABC (c) AB +A C + BC

Constructing a Truth Table and Logic Circuit

Constructing a Truth Table and Logic Circuit

Information Representation Computers represent data in the following forms Number System A computer system considers numbers as data; it includes integers, decimals, and complex numbers. All the inputted numbers are represented in binary formats like 0 and 1. A number system is categorized into four types −

Binary  − A binary number system is a base of all the numbers considered for data representation in the digital system. A binary number system consists of only two values, either 0 or 1; so its base is 2. It can be represented to the external world as (10110010) 2 . A computer system uses binary digits (0s and 1s) to represent data internally. Octal  − The octal number system represents values in 8 digits. It consists of digits 0,12,3,4,5,6, and 7; so its base is 8. It can be represented to the external world as (324017) 8 . Decimal  − Decimal number system represents values in 10 digits. It consists of digits 0, 12, 3, 4, 5, 6, 7, 8, and 9; so its base is 10. It can be represented to the external world as (875629) 10 . Hexadecimal number  − Hexadecimal number system represents values in 16 digits. It consists of digits 0, 12, 3, 4, 5, 6, 7, 8, and 9 then it includes alphabets A, B, C, D, E, and F; so its base is 16. Where A represents 10, B represents 11, C represents 12, D represents 13, E represents 14 and F represents 15.

Number System System Base Digits Binary 2 0 1 Octal 8 0 1 2 3 4 5 6 7 Decimal 10 0 1 2 3 4 5 6 7 8 9 Hexadecimal 16 0 1 2 3 4 5 6 7 8 9 A B C D E F The below-mentioned table below summarises the data representation of the number system along with their Base and digits.

Bits and Bytes Bits A bit is the smallest data unit that a computer uses in computation; all the computation tasks done by the computer systems are based on bits. A bit represents a binary digit in terms of 0 or 1. Bytes A group of eight bits is called a byte. Half of a byte is called a nibble; it means a group of four bits is called a nibble. A byte is a fundamental addressable unit of computer memory and storage. It can represent a single character, such as a letter, number, or symbol using encoding methods such as ASCII and Unicode.

Byte Value Bit Value 1 Byte 8 Bits 1024 Bytes 1 Kilobyte 1024 Kilobytes 1 Megabyte 1024 Megabytes 1 Gigabyte 1024 Gigabytes 1 Terabyte 1024 Terabytes 1 Petabyte 1024 Petabytes 1 Exabyte 1024 Exabytes 1 Zettabyte 1024 Zettabytes 1 Yottabyte 1024 Yottabytes 1 Brontobyte 1024 Brontobytes 1 Geopbytes

Text Code A Text Code is a static code that allows a user to insert text that others will view when they scan it. It includes alphabets, punctuation marks and other symbols. Some of the most commonly used text code systems are − EBCDIC ASCII Extended ASCII Unicode

Coding System Representation Type Number of Bits Used Example Advantages Limitations Binary           ASCII           Unicode           BCD           Gray Code           EBCDIC           Group activity

Group activity Coding System Representation Type Number of Bits Used Example Advantages Limitations Binary Numbers/Text Uses 0 and 1 (bits) 1010₂ = 10 Simple, universal, efficient for machines Hard for humans to read ASCII Characters 7 bits 'A' = 65 Simple, widely used, good for English Limited to 128 characters Unicode Characters 8–32 bits 'අ' = U+0D85, 😊 = U+1F60A Supports all world languages and emojis Needs more storage BCD Numbers 4 bits per digit 27 = 0010 0111 Easy decimal conversion Inefficient, takes more space Gray Code Numbers Binary variation 101 → 111 Reduces errors in circuits Not useful for text storage EBCDIC Characters 8 bits 'A' = 1100 0001 Extended set used in IBM systems Not widely adopted outside IBM

Abstraction Layers in Computer Systems Design . Why Abstraction is Needed Modern computer systems contain billions of transistors . Designing or programming at this physical level would be overwhelmingly complex and unmanageable. To handle this, engineers use abstraction .

Abstraction Layers in Computer Systems Design 👉 Definition : An abstraction layer is a conceptual level in computer system design that hides unnecessary details of the lower layers and exposes only the essential features needed at that level. Each layer provides a simplified view of the system, enabling programmers, designers, and users to focus only on what matters at their level without being distracted by the complexity beneath.

Abstraction Layers in Computer Systems Design For example, when a programmer writes C = A + B; in a high-level language, they do not need to know how transistors switch on and off to perform the addition—the abstraction layers below handle those details. This step-by-step organization makes modern systems easier to design, understand, and improve .

Abstraction Layers in Computer Systems Design

Abstraction Layers in Computer Systems Design (a ) Algorithms Step-by-step solutions to problems. Example: Sorting numbers using QuickSort . (b) High-Level Programming Languages Human-friendly languages like Python, C++, Java . Example: sum = a + b .

Abstraction Layers in Computer Systems Design ( c) Operating System (OS) Manages hardware and software resources. Example: Windows, Linux, macOS. (d) Instruction Set Architecture (ISA) The interface between software and hardware . Defines available instructions (add, load, jump) and registers . Example: Intel x86, ARM.

Abstraction Layers in Computer Systems Design (e) Microarchitecture Internal design of the processor that implements the ISA. Example: Intel and AMD both support x86 ISA, but with different microarchitectures. (f) Register Transfers Computation described as moving data between registers. Example: R3 ← R1 + R2.

Abstraction Layers in Computer Systems Design ( g) Logic Gates Electronic circuits (AND, OR, NOT, XOR, NAND, NOR). Example: Full adder built from gates. (h) Transistors Physical ON/OFF switches at the lowest level. Billions form the foundation of modern CPUs.

Abstraction Layers in Computer Systems Design

Abstraction Layers in Computer Systems Design Real-Life Example: Adding Two Numbers Algorithm : Decide to compute sum = a + b . Programming : Write C = A + B; . Operating System : Manages memory and process execution. ISA : CPU executes ADD R1, R2, R3 . Microarchitecture : ALU performs addition via circuits. Register Transfers : Data moves between registers (R3 ← R1 + R2). Logic Gates : Addition is performed with AND, OR, XOR. Transistors : Gates operate by switching ON/OFF.
Tags