Engr. Jeffrey T. Dellosa @ CEIT, NORMISIST Email: [email protected]ECE103 Logic Design ECE103 Logic Design and Switching and Switching Theory Theory Engr. Jeffrey T. Dellosa Engr. Jeffrey T. Dellosa College of Engineering and Information Technology (CEIT) College of Engineering and Information Technology (CEIT) Northern Mindanao State Institute of Science and Technology Northern Mindanao State Institute of Science and Technology (NORMISIST) (NORMISIST)
115
Embed
ECE103 Logic Design and Switching Theory Introduction and Chapter 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Engr. Jeffrey T. DellosaEngr. Jeffrey T. DellosaCollege of Engineering and Information Technology (CEIT)College of Engineering and Information Technology (CEIT)
Northern Mindanao State Institute of Science and Technology Northern Mindanao State Institute of Science and Technology (NORMISIST)(NORMISIST)
Academic dishonesty will not be tolerated. Any student found to have participated in academic dishonesty will receive a “5.0” in the course, and maybe subject to disciplinary action.
The State Institute’s Code of Conduct prohibits students from committing the following acts of academic dishonesty: academic fraud, copying or allowing one’s work to be copied, fabrication/falsification, sabotage of other’s work, substitution (ex., taking an exam for someone else).
Digital Computers Digital Computers and Digital Systemsand Digital SystemsToday…
– Computers are used in a variety of applications such as scientific calculations, commercial, and business data processing, air traffic controls, space guidance, educational field among others.
– Digital computers have made possible many scientific, industrial, and commercial advances that would have been unattainable otherwise.
Introduction:– Characteristic of a Digital system is its
manipulation of discrete elements of information.
– Such discrete elements maybe:electric impulses, decimal digits, letters of an alphabet, arithmetic operations, punctuation marks, or any set of meaningful meanings.
Digital Computers Digital Computers and Digital Systemsand Digital Systems
Digital circuitsDigital circuits• What digital modules in digital systems are
made of• Each digital circuit implements a logical function• Combination of digital circuits form a more complex
logical function (of the module)• Combinations of modules – function of devices
• We will study different types of digital circuits and learn to analyze their functionality and ultimately how to design digital circuits that accomplish a desired logical function
How does a computer How does a computer work?work?
• Control unit:– Supervises the flow of information between the
various units
– It retrieves the instructions, one by one, from the program that is stored in the memory
– For each instruction, the control unit informs the processor to execute the operation specified by the instructions & the processor manipulates the data as specified by the program.
1-3 Number Base 1-3 Number Base ConversionsConversions
• A binary number can be converted to a decimal by forming the sum of the powers of 2 of those coefficients whose value is 1.Example:(1010.011)2 = 23 + 21 + 2-2 + 2-3
= (10.375)10
• The binary number has four 1’s and the decimal equivalent is found from the sum of four powers of 2.
• The following is an example of Octal-to-decimal conversion:(630.4)8 = 6 x 82 + 3 x 8 + 4 x 8-1
• The conversion from decimal to binary or to any other base-r system is more convenient if the number is separated into an integer part and a fraction part and the conversion of each part done separately.
1-5 COMPLEMENTS1-5 COMPLEMENTS• Subtraction with complements
– Similar to the subtraction done in elementary, in this method, we borrow a 1 from a higher significant position when the minuend digit is smaller than the subtrahend digit.
• Subtraction with complements3. If M < N, the sum does not
produce an end carry and is equal to rn – (N – M), which is the r’s complement of (N – M). To obtain the answer in familiar form, take the r’s complement of the sum and place a negative sign in front.
1-6 SIGNED Binary 1-6 SIGNED Binary NumbersNumbers
• Due to hardware limitations, computers must represent everything with binary digits, commonly referred to as BITS.
• It is customary to represent the sign with a bit placed in the leftmost position of the number for binary numbers.– The convention is to make the sign bit 0 for
1-6 SIGNED Binary 1-6 SIGNED Binary NumbersNumbers
• The representation of the signed numbers is referred as the SIGNED – MAGNITUDE Convention.
• In this notation, the number consists of a Magnitude and Symbol ( + or - ) or a BIT (0 or 1) indicating the sign.
• When arithmetic operations are implemented in a computer, it is more convenient to use a different system for representing negative numbers, referred to as the SIGNED COMPLEMENT System.
1-6 SIGNED Binary 1-6 SIGNED Binary NumbersNumbers
• The signed-magnitude system is used in ordinary arithmetic, but is awkward when employed in computer arithmetic.
• Therefore, the signed-complement is normally used.
• The 1’s complement presents some difficulties and is seldom used for arithmetic operations and the signed binary arithmetic deals more with the 2’s complement in representing negative numbers.
1-6 SIGNED Binary 1-6 SIGNED Binary NumbersNumbers
• ARITHMETIC ADDITION– The procedure can be stated as follows
for binary:
•The addition of two signed binary numbers with negative numbers represented in signed 2’s complement form is obtained from the addition of the two numbers, including their sign bits. A carry out of the sign-bit position is discarded.
• Electronic digital systems use signals that have two distinct values and circuit elements that have two stable states.– There is a direct analogy among binary
numbers, binary circuit elements, and binary digits.
– For example, a binary number of n digits may be represented by n binary circuit elements, each having an output signal equivalent to a 0 or a 1.
• Digital systems represent and manipulate not only binary numbers, but also many other discrete elements of information.– Any discrete element of information
distinct among a group of quantities can be represented by a binary code.
– Codes must be in binary because computers can only hold 1’s and 0’s.
1-7 BINARY CODES1-7 BINARY CODES• A bit bit by definition is a binary digit and
when used in conjunction with a binary code, it is better to think of it as denoting a binary quantity equal to 0 or 1.– To represent a group of 22nn distinct elements
in a binary code requires a minimum of n bits.
– This is because it is possible to arrange n bits in 22nn distinct ways.
– A group of four distinct quantities can be represented by a two-bit code, with each quantity assigned one of the following bit combinations: 00, 01, 10, 11.
– A group of eight elements requires a three-bit code, with each element assigned to one and only one of the following: 000, 001, 010, 011, 100, 101, 110, 111.
1-9 BINARY LOGIC1-9 BINARY LOGIC• Binary logic deals with variables
that take on two discrete values and with operations that assumes logical meaning.– The two values the variables take may
be called by different names (e.g., true and false, yes and no, etc.) but it is more convenient to think in terms of bits and assign the values of 1 and 0.
1-9 BINARY LOGIC1-9 BINARY LOGIC• Binary logic is used to describe, in
mathematical way, the manipulation and processing of binary information.
– It is suited for the analysis and design of digital systems.
– For example, the digital logic circuits of figure 1-3 in your book that perform the binary arithmetic are the circuits whose behavior is conveniently expressed by means of binary variables and logical operations.
1-9 BINARY LOGIC1-9 BINARY LOGIC• DEFINITION of Binary Logic
– Binary Logic consists of binary variables and logical operations.
– Variables are designated by letters of alphabet such as A, B, C, x, y, z, etc. with each variable having two and only two distinct possible values: 1 and 0.
– There are three basic logical operations: AND, OR and NOT.
1-9 BINARY LOGIC1-9 BINARY LOGIC•DEFINITION of Binary Logic
– For each combination of the values of x and y, there is a value of z specified by the definition of the logical operation.
– These definitions can be listed in a compact form known as TRUTH Tables.
– A truth table is a table of all possible combinations of the variables showing the relation between the values that the variables may take and the result of the operation.
1-9 BINARY LOGIC1-9 BINARY LOGICSwitching Circuits and Binary Signals
– Manual switches A and B represent two binary variables with values equal to 0 when the switches is open and 1 when the switch is closed. Similarly, let the lamp L represent a third binary variable equal to 1 when the light is on and 0 when off.
1-9 BINARY LOGICSwitching Circuits and Binary Signals
– Electronic digital circuits are sometimes called switching circuits because they behave like a switch such as the transistor.
– Instead of changing the switch manually, an electronic switching circuit uses binary signals to control the conduction or non-conduction state of the active element.
– Electrical signals such as voltage and current exist throughout a digital system in either one of two recognizable values (except during transition).
1-9 BINARY LOGIC1-9 BINARY LOGIC• Electronic digital circuits are also called
LOGIC CIRCUITS because, with the proper input, they establish logical manipulation paths.
• Any desired information for computing or control can be operated upon by passing binary signals through various combinations of logic circuits, each signal representing a variable and carrying one bit of information.
Boolean Algebra and Logic Boolean Algebra and Logic GatesGates
•Boolean algebra, like any other deductive mathematical system, maybe defined with a set of elements, a set of operators, and a number of unproved axioms or postulates.
Boolean Algebra and Logic Boolean Algebra and Logic GatesGates
• In traditional logic, an axiom or postulate is a proposition that is not proved or demonstrated but considered to be either self-evident, or subject to necessary decision. Therefore, its truth is taken for granted, and serves as a starting point for deducing and inferring other (theory dependent) truths.
• an axiom is any mathematical statement that serves as a starting point from which other statements are logically derived
Boolean Algebra and Logic Boolean Algebra and Logic GatesGates
Basic DefinitionsBasic Definitions• A set of elementsset of elements is any collection of
objects having a common property
• If SS is a set, and x and y are certain objects, then x SS denotes that x is a member of the set SS, and y SS denotes that y is not an element of SS.
• A set with a denumerable number of elements is specified by braces: A = {1, 2, 3, 4}, i.e., the elements of set A are the numbers 1, 2, 3 and 4.
Boolean Algebra and Logic Boolean Algebra and Logic GatesGates
Basic DefinitionsBasic Definitions• A binary operator binary operator defined on a set SS of
elements is a rule that assigns to each pair of elements from SS a unique element from SS.
• Example: a * b = c, we say that * is a binary operator if it specifies a rule for finding c from the pair (a, b) and also if a, b, c SS.– However, * is not a binary operator if a, b S S
Boolean Algebra and Logic Boolean Algebra and Logic GatesGates
Basic DefinitionsBasic Definitions1.1. Closure – Closure – A set S is closed with respect
to a binary operator if, for every pair of element S, the binary operator specifies a rule for obtaining a unique element of S.
For example: The set of natural numbers N = {1, 2, 3, 4, . . . } is closed with respect to the binary operator plus (+) by the rules of arithmetic addition since for any a, b N we obtain a unique c N by the operation a + b = c.
Boolean Algebra and Logic Boolean Algebra and Logic GatesGates
Basic DefinitionsBasic Definitions2.2. Associative Law – Associative Law – A binary operator * on a set S is said
to be associative whenever(x * y) * z = x * (y * z) for all x, y, z SS
3.3. Commutative LawCommutative Law – A binary operator * on a set S is said to be commutative whenever
x * y = y * x for all x, y SS
4.4. Identity Element – Identity Element – A set S is said to have an identity element with respect to a binary operation * on S if there exists an element e S with the property
e * x = x * e = x for every x S
Example: The element 0 is an identity element with respect to operation + on the set of integers I = {…, -3, -2, -1, 0, 1, 2, 3, …} since x + 0 = 0 + x = x for any x I
Boolean Algebra and Logic GatesBoolean Algebra and Logic GatesBasic DefinitionsBasic Definitions
The operators and postulates The operators and postulates have the following meanings:
1.1. The binary operator + defines addition.The binary operator + defines addition.2.2. The additive identity is 0.The additive identity is 0.3.3. The additive inverse defines subtractions.The additive inverse defines subtractions.4.4. The binary operator The binary operator • defines multiplication• defines multiplication5.5. The multiplicative identity is 1.The multiplicative identity is 1.6.6. The multiplicative inverse of a = 1/a defines The multiplicative inverse of a = 1/a defines
division.division.7.7. The only distributive law applicable is that of The only distributive law applicable is that of • •
over +:over +:a a • (b + c) = (a • b) + (a • c)• (b + c) = (a • b) + (a • c)
Axiomatic Definitions of Boolean Axiomatic Definitions of Boolean AlgebraAlgebra
Boolean algebra is defined by a set of elements, B, provided following postulates with two binary operators, + and ., are satisfied:
• Closure with respect to the operators + and ..• An identity element with respect to + and . is 0 and 1,respectively.• Commutative with respect to + and .. Ex: x + y = y + x • + is distributive over . : x + (y . z)=(x + y) . (x + z)• . is distributive over + : x . (y + z)=(x . y) + (x . z)• Complement elements: x + x’ = 1 and x . x’ = 0.•There exists at least two elements x,y B such that x≠y.
Comparing Boolean algebra with arithmetic and ordinary
algebra.1. Huntington postulates don’t include the associative law, however, this holds for Boolean algebra.
2. The distributive law of + over . is valid for Boolean algebra, but not for ordinary algebra.
3. Boolean algebra doesn’t have additive and multiplicative inverses; therefore, no subtraction or division operations.
4. Postulate 5 defines an operator called complement that is not available in ordinary algebra.
5. Ordinary algebra deals with the real numbers. Boolean algebra deals with the as yet undefined set of elements, B, in two-valued Boolean algebra, the B have two elements, 0 and 1.
A two-valued Boolean algebra is defined on a set A two-valued Boolean algebra is defined on a set of two elements, B = {0, 1}, with rules for the of two elements, B = {0, 1}, with rules for the two binary operators + and two binary operators + and • as shown in the • as shown in the following operator tables:following operator tables:
These rules are exactly the same as the AND, OR and NOT operations, respectively.
Diagram of the Distributive Diagram of the Distributive lawlaw
• To emphasize the similarities between two-valued Boolean algebra and other binary systems, this algebra was called “binary logic”. We shall drop the adjective “two-valued” from Boolean algebra in subsequent discussions.