Professional Documents
Culture Documents
COMPUTER ARCHITECTURE
2.1.1: Outline the architecture of the CPU, the functions of the ALU, the
CU and the registers within the CPU
Reproduce a block diagram showing the relationship between the
elements of the CPU, input and output and storage. The memory
address register (MAR) and memory data register (MDR) are the only
ones that need to be included.
Topic 2: Computer Organization 3 / 164
2.1 Computer Organization – Computer architecture
2.1.1: Outline the architecture of the CPU, the functions of the ALU, the CU and the registers within the CPU
Computer Architecture
Computer Architecture
Question:
Imagine we have a digital camera which is a sort of computer system.
In order to take a picture the system follows the input, process, output
and storage model.
Explain how this model works.
Topic 2: Computer Organization 5 / 164
2.1 Computer Organization – Computer architecture
2.1.1: Outline the architecture of the CPU, the functions of the ALU, the CU and the registers within the CPU
Computer Architecture
Computer Architecture
Cores
Computer Architecture
Register
It is a small storage location that can hold data. Registers are the
smallest and fastest units of memory in a computer system and are used
to store the information that CPU is working on at the exact moment.
Primary Memory
It is the only storage directly accessible from the CPU. It cosists of RAM
(Random Access Memory) and ROM (Read Only Memory).
Topic 2: Computer Organization 13 / 164
2.1 Computer Organization – Computer architecture
2.1.1: Outline the architecture of the CPU, the functions of the ALU, the CU and the registers within the CPU
The connection between the MDR and the RAM is accomplished by the
Data Bus.
Topic 2: Computer Organization 14 / 164
2.1 Computer Organization – Computer architecture
2.1.1: Outline the architecture of the CPU, the functions of the ALU, the CU and the registers within the CPU
More registers . . .
Block Diagram
The following block diagram shows the relationship between the elements
of the CPU, input and output and storage.
Topic 2: Computer Organization 16 / 164
2.1 Computer Organization – Computer architecture
2.1.1: Outline the architecture of the CPU, the functions of the ALU, the CU and the registers within the CPU
Computer Architecture
Questions
Describe the function of the data bus found in a PC.
Outline the function of the ALU.
Topic 2: Computer Organization 17 / 164
2.1 Computer Organization – Computer architecture
2.1.2: Describe primary memory
COMPUTER ARCHITECTURE
2.1.2: Describe primary memory.
Distinguish between random access memory (RAM) and
read-only-memory (ROM), and their use in primary memory.
Topic 2: Computer Organization 18 / 164
2.1 Computer Organization – Computer architecture
2.1.2: Describe primary memory
Primary Memory
Primary Memory
is the only storage that is directly accessible by the CPU.
holds data that is currently running on the computer system.
holds instructions that are currently running on the computer
Content
It is where instructions and data reside
Address
It is used by the CU to find, retrieve and access the data in order to send
it to the ALU for processing.
Topic 2: Computer Organization 20 / 164
2.1 Computer Organization – Computer architecture
2.1.2: Describe primary memory
ROM (Read-Only-Memory)
Primary Memory
Question
Identify some differences between ROM and RAM found in a PC.
Topic 2: Computer Organization 22 / 164
2.1 Computer Organization – Computer architecture
2.1.2: Describe primary memory
COMPUTER ARCHITECTURE
2.1.3: Explain the use of cache memory.
Explain the effect of cache memory in speeding up the system as well as
being able to explain how it is used.
Topic 2: Computer Organization 24 / 164
2.1 Computer Organization – Computer architecture
2.1.3: Explain the use of cache memory.
Level 1 (L1) Cache is extremely fast but relatively small, and is usually
embedded in the processor chip (CPU).
Level 2 (L2) Cache is often more capacious than L1; it may be located
on the CPU or on a separate chip or coprocessor with a
high-speed alternative system bus interconnecting the
cache to the CPU, so as not to be slowed by traffic on the
main system bus.
Level 3 (L3) Cache is typically specialized memory that works to improve
the performance of L1 and L2. It can be significantly
slower than L1 or L2, but is usually double the speed of
RAM. In the case of multicore processors, each core may
have its own dedicated L1 and L2 cache, but share a
common L3 cache. When an instruction is referenced in
the L3 cache, it is typically elevated to a higher tier cache.
Topic 2: Computer Organization 26 / 164
2.1 Computer Organization – Computer architecture
2.1.3: Explain the use of cache memory.
Question
Since cache memory is faster, why don’t we make all main memory out
of cache memory?
Topic 2: Computer Organization 27 / 164
2.1 Computer Organization – Computer architecture
2.1.3: Explain the use of cache memory.
Cache Memory
Cache Memory
Question
State some differences between Cache Memory and RAM.
Topic 2: Computer Organization 29 / 164
2.1 Computer Organization – Computer architecture
2.1.3: Explain the use of cache memory.
Memory Types
Topic 2: Computer Organization 30 / 164
2.1 Computer Organization – Computer architecture
2.1.3: Explain the use of cache memory.
Topic 2: Computer Organization 31 / 164
2.1 Computer Organization – Computer architecture
2.1.4: Explain the machine instruction cycle.
COMPUTER ARCHITECTURE
2.1.4: Explain the machine instruction cycle.
Include the role of data bus and (memory) address bus.
Topic 2: Computer Organization 32 / 164
2.1 Computer Organization – Computer architecture
2.1.4: Explain the machine instruction cycle.
Execute Instruction
ALU executes the instruction using the necessary data that have been
loaded and calculates the result.
The CPU then checks for the next instruction and repeats the steps
described above by fetching, decoding, executing the next instruction and
storing the result.
Topic 2: Computer Organization 37 / 164
2.1 Computer Organization – Computer architecture
2.1.4: Explain the machine instruction cycle.
Questions
Draw a block digram showing the basic components of the CPU and
how they interact with memory.
Outline the four phases of the machine instruction cycle.
Compare the roles of the Memory Address Register and the Memory
Data Register.
Topic 2: Computer Organization 38 / 164
2.1 Computer Organization - Secondary Memory
2.1.5: Identify the need for persistent storage.
SECONDARY MEMORY
2.1.5: Identify the need for persistent storage.
LINK: Consequences of data loss. Why do we need storage?
Topic 2: Computer Organization 39 / 164
2.1 Computer Organization - Secondary Memory
2.1.5: Identify the need for persistent storage.
Secondary Memory
Secondary Memory
Secondary Memory
Devices
Virtual Memory
is the use of secondary memory as if it was primary memory.
is a common part of most operating systems.
provides a big benefit for users at a very low cost.
Questions
State some differences between primary and secondary memory.
Explain the advantages of virtual memory.
Topic 2: Computer Organization 46 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.6: Describe the main functions of an operating system.
Peripheral Devices
All hardware components of a computer system that reside outside the
CPU. Examples: keyboard, monitor, mouse, printer, microphone etc.
An operating system:
manages connections to and interconnections with networks of other
computer systems so as to allow the sharing go resources (files,
printers etc)
acts as an intermediary between applications and networks, allowing
operations to interact with networks in a straightforward manner.
Topic 2: Computer Organization 53 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.6: Describe the main functions of an operating system.
The operating system is also responsible for the overall security of the
computer system.
Methods:
provide some form of identity to the user that will allow his
authentication (username & password)
magnetic cards
biometric data
use of log files that keep trace of the activity of any user in the
computer system. Anything that a user does is recorded so that
unauthorized users and activities may be discovered.
Topic 2: Computer Organization 55 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.6: Describe the main functions of an operating system.
Operating System
Questions
Outline the main functions of an operating system.
Outline how the operating system ensures that files are only
accessed by allowed users.
In what ways can an operating system improve information security
in a computer?
Topic 2: Computer Organization 58 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.7: Outline the use of a range of application software.
Software Applications
A computer system has the ability to run software applications that have
been installed by the manufacturer to complete some predefined tasks.
Example: Digital Camera
consists of both hardware and software components
follows the input-process-output and storage model
software components are preloaded and complete predefined tasks
software components can only be altered by receiving their updated
versions from the manufacturer
Topic 2: Computer Organization 60 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.7: Outline the use of a range of application software.
Software Applications
Word processors
A software application that is used for the production of any sort of
document. Includes tools for:
composition
editing
formatting
possibly printing
Spreadsheets
Spreadsheet Applications
Microsoft Excel, Numbers, OpenOffice Calc
Topic 2: Computer Organization 63 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.7: Outline the use of a range of application software.
Database
It is an organised collection of data.
Data are stored in some sort of table and the are organized in
records (i.e. rows) and fields (i.e. columns)
A key feature of a database is the unique or primary key: a specific
field that uniquely identify each record.
Question
A school has a database with all the information about the students.
Suggest 5 fields that this database could have. Suggest a primary
(unique) key.
Topic 2: Computer Organization 64 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.7: Outline the use of a range of application software.
Question
A school has a database with all the information about the students.
Suggest 5 fields that this database could have. Suggest a primary
(unique) key.
Web Browsers
Examples
Google Chrome, Internet Explorer, Safari, Mozilla Firefox.Software
applications
Topic 2: Computer Organization 66 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.7: Outline the use of a range of application software.
Email (1/2)
Email (2/2)
Question
State one advantage and one disadvantage of webmail over a mail
application that is installed on a person’s computer.
Topic 2: Computer Organization 68 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.7: Outline the use of a range of application software.
Question
State one advantage and one disadvantage of webmail over a mail
application that is installed on a person’s computer.
Answer
Webmail is accessible from any computer device that has a web browser.
It is also safer, since it can be tuned to require password at each
connection.
On the other hand webmail is usually slower, is not displayed nicely on all
devices and the user needs more time to connect to it.
Topic 2: Computer Organization 69 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.7: Outline the use of a range of application software.
A Dialogue Box
Topic 2: Computer Organization 77 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.8: Identify common features of applications
Question
Question
BINARY REPRESENTATION
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
Topic 2: Computer Organization 85 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
Decimal Representation
The decimal number system is a positional system that uses ten digits
(0,1,2,3,4,5,6,7,8,9) to represent any number.
The digits in the decimal number system can be used with a decimal
separator to represent a fractional part, as well as plus/minus sign (+/-)
to indicate whether the number represented is grader or less than zero.
The position of each digit within a number provides the multiplier by
which that digit is multiplied.
The multiplier is always a power of ten.
Apart from the decimal number system there exist a couple of other
useful number systems that are widely used in computer science:
Binary system (base-2)
Hexadecimal System (base-16)
Topic 2: Computer Organization 86 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
Binary Representation
The Binary System is a positional system that uses two digits (0 and 1)
to represent any number.
Has 2 as its base (base-2 system).
Is the most widely used system in computer science.
Numbers represented in this system are known as binary numbers.
The position of each digit within a number determines the multiplier with
which that digit is multiplied.
The multiplier is always a power with a base of 2 and an exponent that
increases by one compared with the exponent of the position to its right
(starting with 20 ).
Topic 2: Computer Organization 87 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
Bit
Byte
Question
Conversions
Binary numbers → Decimal numbers
Decimal numbers → Binary numbers
Topic 2: Computer Organization 95 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
Addition in Binary
Addition in binary is an analogue of the well known addition method in
decimal. All one has to know by heart are the following:
So, each time we have to add 1 and 1 we have 0 in the result and 1 in
the carry. Also when we add 1, 1 and 1 we have 1 in the result and 1 in
the carry.
The follwoing addition shows that x + y = z, where
x = (111)10 = (1101111)2 , y = (54)10 = (110110)2 and
z = (165)10 = (10100101)2 .
Carry 1 1 1 1 1 0
x 1 1 0 1 1 1 1
y 0 1 1 0 1 1 0
z 1 0 1 0 0 1 0 1
Topic 2: Computer Organization 96 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
MSB
The Most Significant Bit (MSB) is the bit position in a binary number
having the greatest value. It is the leftmost bit.
LSB
The Least Significant Bit (LSB) is the bit on the right, which gives us
what we call the units value.
Question
Conversions
Positive number to its negative equivalent.
Negative number to its positive equivalent.
Topic 2: Computer Organization 99 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
Fractions
In the binary system and in the decimal system the radix point is used to
separate the fractional from the whole part.
Topic 2: Computer Organization 100 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
Question
Conversions
Positive decimal fraction to binary.
Binary fraction to decimal.
Topic 2: Computer Organization 103 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
(A57F )16 =
(A · 163 + 5 · 162 + 7 · 161 + F · 160 )10 =
(10 · 163 + 5 · 162 + 7 · 161 + 15 · 160 )10 =
(42367)10 .
Topic 2: Computer Organization 104 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
(A57F )16 =
(A · 163 + 5 · 162 + 7 · 161 + F · 160 )10 =
(10 · 163 + 5 · 162 + 7 · 161 + 15 · 160 )10 =
(42367)10 .
Remember
Question
Conversions
Hexadecimal numbers → Decimal numbers
Decimal numbers → Hexadecimal numbers
Topic 2: Computer Organization 107 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.9: Define the terms bit, byte, binary, denary/decimal, hexadecimal.
BINARY REPRESENTATION
2.1.10: Outline the way in which data is represented in the computer.
To include strings, integers, characters and colours. This should include
considering the space taken by data, for instance the relation between the
hexadecimal representation of colours and the number of colours
available.
TOK, INT Does binary represent an example of a lingua franca?
S/E, INT Comparing the number of characters needed in the Latin
alphabet with those in Arabic and Asian languages to understand the
need for Unicode.
Topic 2: Computer Organization 112 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.10: Outline the way in which data is represented in the computer.
Data Representation
Computer systems are binary systems, meaning that there are only
two possible values that they can represent -the values 0 and 1.
These two values can be represented by a single bit.
In order to represent more complex data, sequences of bits are used.
The length of binary digit sequences determines the possible number
of different representations that can be achieved.
By using n bits we can represent 2n different values.
Topic 2: Computer Organization 113 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.10: Outline the way in which data is represented in the computer.
Data Representation
Question
Why is the Unicode character encoding scheme needed?
Topic 2: Computer Organization 116 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.10: Outline the way in which data is represented in the computer.
Question
Why is the Unicode character encoding scheme needed?
Answer
See next slides :)
Topic 2: Computer Organization 117 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.10: Outline the way in which data is represented in the computer.
For Arabic and Asian languages, there’s not enough room in a 128 set, or
even in a full 256 extended ASCII set to fit all the characters. There are
tens of thousands of Chinese characters, for example.
So, Arabic and Asian languages and indeed a whole bunch of other kinds
of languages demand more than 256 characters.
So we now have computers which work with UNICODE, which can
represent thousands of characters. UNICODE uses 16 bits per character.
In UNICODE, two bytes (16 bits) are read for each character, which
means that there are 216 = 65, 536 different combinations.
Topic 2: Computer Organization 118 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.10: Outline the way in which data is represented in the computer.
UTF-8
UTF-8 stands for Unicode Transformation Format-8-bit. It is a
variable-width character encoding used for electronic communication.
Topic 2: Computer Organization 119 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.10: Outline the way in which data is represented in the computer.
Hexadecimal RGB colour values specify the amount of red, green and blue
light that need to appear at a pixel, in order to produce a specific colour.
By combining different shades of red, green and blue a large variety of
colours can be displayed.
Each colour value is represented as a hexadecimal value of two digits that
may take up values from 00 to FF.
In order to describe a colour value in this way, a six-digit hexadecimal
number is needed, ex. 4E54F2.
The first two hexadecimal digits represent the red colour
the next two the green colour
the last two the blue colour
Topic 2: Computer Organization 121 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.10: Outline the way in which data is represented in the computer.
Examples of Colours
black: 00 00 00
red: FF 00 00
green: 00 FF 00
blue: 00 00 FF
white: FF FF FF
Topic 2: Computer Organization 122 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.10: Outline the way in which data is represented in the computer.
A lingua franca is a language which most people around the world can
understand.
So, yes, binary, in a way does represent a lingua franca, in so far as the
computers most people around the world use are able to interpret the
character codes sets ASCII and UNICODE
Topic 2: Computer Organization 132 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.10: Outline the way in which data is represented in the computer.
A B A·B
0 0 0
0 1 0
1 0 0
1 1 1
Remember
A AND B is 1 if A = B = 1
A AND B is 0 if at at least one of A, B is 0
Topic 2: Computer Organization 136 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.11: Define the Boolean operators: AND, OR, NOT, NAND, NOR, XOR
The Gate OR
A OR B is also denoted by the symbol A + B
The truth table of OR is
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
Remember
The symbol + here does not denote addition in the usual way!
A OR B is 0 if A = B = 0
A OR B is 1 if at at least one of A, B is 1
Topic 2: Computer Organization 137 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.11: Define the Boolean operators: AND, OR, NOT, NAND, NOR, XOR
A A
0 1
1 0
Remember
NOT A is the inverse of A.
Topic 2: Computer Organization 138 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.11: Define the Boolean operators: AND, OR, NOT, NAND, NOR, XOR
A B A·B
0 0 1
0 1 1
1 0 1
1 1 0
Remember
A NAND B is 0 if A = B = 1
A NAND B is 1 if at at least one of A, B is 0
Topic 2: Computer Organization 139 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.11: Define the Boolean operators: AND, OR, NOT, NAND, NOR, XOR
A B A+B
0 0 1
0 1 0
1 0 0
1 1 0
Remember
A NOR B is 1 if A = B = 0
A NOR B is 0 if at at least one of A, B is 1
Topic 2: Computer Organization 140 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.11: Define the Boolean operators: AND, OR, NOT, NAND, NOR, XOR
A B A⊕B
0 0 0
0 1 1
1 0 1
1 1 0
Remember
A XOR B is 1 if A 6= B
A XOR B is 0 if A = B
Topic 2: Computer Organization 141 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.11: Define the Boolean operators: AND, OR, NOT, NAND, NOR, XOR
Order of Operations
NOT takes precedence,
then AND, and NAND,
and finally OR, NOR, and XOR in order from left to right.
Hence,
NOT A AND B OR C
is actually
((NOT A) AND B) OR C .
NOT A AND B OR C
as
A · B + C.
Topic 2: Computer Organization 142 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.11: Define the Boolean operators: AND, OR, NOT, NAND, NOR, XOR
In terms of programming . . .
The logic gate is on (meaning it has electricity flowing through it) when:
AND: Both input switches are closed. At the programming level,
both statements must be true for an AND statement to
evaluate to true. (a && b) in Java
OR: one input switch or the other is closed. At the
programming level, one of the 2 statements are true (if the
OR statement evaluates to true). (a||b) in Java.
NAND: At least one switch is not closed. !(a && b) in Java.
NOR: Both switches are not closed !(a||b) in Java
NOT: the input is not on (or the gate is turned off if its input
was on). Not gate stops flow of electricity if it was flowing
before, and makes electricity flow if it wasn’t. At the
programming level, the statement is not true. !(a) in Java.
XOR: one switch is closed, but not both. At the programming
level, one statement or the other can be true. (a ˆ b)
in Java.
Topic 2: Computer Organization 143 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
1 Maria won’t go to school if it’s cold and raining or she has not done
her homework.
C=it’s cold
R = it’s raining
H = she has done her homework
C AND R OR NOT H = C · R + H
2 If the airplane is late and there and no taxis at the airport, we will
have to cancel our meeting tomorrow.
L=the airplane is late
T = there are taxis at the airport
L AND NOT T = A · T
Topic 2: Computer Organization 145 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
H XOR S = H ⊕ S = H · S + S · H
2 If it rains, or it does not rain and is very cloudy, I will need an
umbrella.
R = it rains
C = is very cloudy
R OR (NOT R AND C ) = R + R · C
Topic 2: Computer Organization 146 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
When we have a boolean expression with n variables, the truth table will
have 2n rows.
Does this sound familiar?
Is there a connection between truth tables and representation of data?
Topic 2: Computer Organization 147 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
A AND B OR C
A B C A·B A·B +C
0 0 0 0 0
0 0 1 0 1
0 1 0 0 0
0 1 1 0 1
1 0 0 0 0
1 0 1 0 1
1 1 0 1 1
1 1 1 1 1
Topic 2: Computer Organization 148 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
(A OR B) AND C
A B C A + B (A + B) · C
0 0 0 0 0
0 0 1 0 0
0 1 0 1 0
0 1 1 1 1
1 0 0 1 0
1 0 1 1 1
1 1 0 1 0
1 1 1 1 1
Topic 2: Computer Organization 149 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
A OR B XOR C
A B C A + B (A + B) ⊕ C
0 0 0 0 0
0 0 1 0 1
0 1 0 1 1
0 1 1 1 0
1 0 0 1 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 0
Topic 2: Computer Organization 150 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
A XOR B AND C
A B C B · C A ⊕ (B · C )
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
0 1 1 1 1
1 0 0 0 1
1 0 1 0 1
1 1 0 0 1
1 1 1 1 0
Topic 2: Computer Organization 151 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
A AND B OR NOT C
A B C C A·B A·B +C
0 0 0 1 0 1
0 0 1 0 0 0
0 1 0 1 0 1
0 1 1 0 0 0
1 0 0 1 0 1
1 0 1 0 0 0
1 1 0 1 1 1
1 1 1 0 1 1
Topic 2: Computer Organization 152 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
A NOR B OR C
A B C A+B A+B +C
0 0 0 1 1
0 0 1 1 1
0 1 0 0 0
0 1 1 0 1
1 0 0 0 0
1 0 1 0 1
1 1 0 0 0
1 1 1 0 1
Topic 2: Computer Organization 153 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
A XOR B NAND C
A B C B ·C A⊕B ·C
0 0 0 1 1
0 0 1 1 1
0 1 0 1 1
0 1 1 0 0
1 0 0 1 0
1 0 1 1 0
1 1 0 1 0
1 1 1 0 1
Topic 2: Computer Organization 154 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
1 X = A OR B AND C
2 X = A AND B AND C
3 X = (A OR B) AND C
4 X = (NOT A OR B) AND NOT C
5 X = A XOR B OR C
6 X = (A XOR B) AND C
7 F =A·B ·C +A·B ·C +A·B ·C
8 F =A·B ·C +A·B ·C +A·B ·C +A·B ·C
Topic 2: Computer Organization 155 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.12: Construct truth tables using the Boolean operators.
An alarm system has three inputs Q, W and R, and one output I. When
signal at Q is false then the output at I is the same as input signal R.
When the signal at Q is true then the output at I is the same as input
signal W.
Construct a truth table for this scenario.
Topic 2: Computer Organization 157 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.13: Construct a logic diagram using AND, OR, NOT, NAND, NOR, and XOR gates.
Logic Gates
Logic Gates
A AND B OR NOT B
Topic 2: Computer Organization 161 / 164
2.1: Computer Organization – Operating systems and application systems
2.1.13: Construct a logic diagram using AND, OR, NOT, NAND, NOR, and XOR gates.
Exercises
Exercises
Resources