Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
5 views6 pages

Chapter 4

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 6

Chapter Four: Computer System Architecture

CHAPTER FOUR
Computer system architecture
Logic elements and Boolean algebra
Logic and bit operations
 Computers represent information by bits.
 A bit has two possible values, namely zero and one.
 This meaning of the word comes from binary digit, since zeroes and ones are the digits used
in binary representations of numbers.
 A bit can be used to represent a truth value, since there are two truth values, true and false.
 A variable is called a Boolean variable if its values are either true or false.
 Computer bit operations correspond to the logical connectives.
What are logic gates?
 In the binary lesson, we discussed the switches inside a computer
 Logic gates are the switches that turn ON or OFF depending on what the user is doing!
 They are the building blocks for how computers work.
 Logic gates turn ON when a certain condition is true, and OFF when the condition is false
 They check whether or not the information they get follows a certain rule
 They either spit out the answer true (ON) or false (OFF)
Remember:
 True= ON = 1
 False = OFF=0
 Types of Logic Gates!
 Major logic gates: NOT, AND, OR, and XOR
 There are also other ones, such as NAND, NOR, and XNOR.
 This is called Boolean logic
 In a circuit schematic each logic gate is represented by a different picture, like the ones
shown below.

Page 1 of 6 By:- Ahmed A.


Chapter Four: Computer System Architecture

NOT
 NOT is the most simple logic gate.
 All it does is take in an input that is either ON or OFF and spits out the opposite.
 So for a 1 it will give a 0, and for a 0 it will give a 1.
 Another name for a NOT gate is inverter, because it inverts (makes opposite) the input

The NOT gate


 Ā with a
 This is also shown as A'
A A’

0 1

1 0
NOT Truth Table

AND
 Unlike NOT, AND needs two inputs
 It only turns on when both inputs are ON
 If only one input is on, it spits out OFF
 If both inputs are off, it spits out OFF

Page 2 of 6 By:- Ahmed A.


Chapter Four: Computer System Architecture

AND Truth Table


 A convenient way to visualize the outputs for the logic gates is through a truth table
 The truth table depicts the gate’s response to each possible set of inputs

AND Truth Table


OR
 OR also needs two inputs
 OR needs one input to be ON for it to spit out ON
 It is also ON when both inputs are ON
 It is OFF when both inputs are OFF

The OR gate

Page 3 of 6 By:- Ahmed A.


Chapter Four: Computer System Architecture

2 Input OR gate
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
OR Truth Table
NAND gate
 This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate.
 The outputs of all NAND gates are true if any of the inputs are false.
 The symbol is an AND gate with a small circle on the output.
 The small circle represents inversion.

The NAND gate

NAND Truth Table

Page 4 of 6 By:- Ahmed A.


Chapter Four: Computer System Architecture

NOR gate
 This is a NOT-OR gate which is equal to OR agate followed by a NOT gate.
 The outputs of all NOR gates are false if any of the inputs are true.
 The symbol is an OR gate with a small circle on the output.
 The small circle represents inversion.z

The NOR gate

Page 5 of 6 By:- Ahmed A.


Chapter Four: Computer System Architecture

NOR Truth Table

Stacking Logic Gates!


 An output of one logic gate can be an input to another logic gate.
 This creates trees of gates that depend on each other.

Page 6 of 6 By:- Ahmed A.

You might also like