Computer
Organization
Grade 11
01
Computer
Architecture
The central processing unit (CPU) and its elements
Computer Systems
● Computer systems consist of hardware and software components and
follow the concept of the input, process, output and storage model.
● This means that a computer system takes in some data as input,
processes it in a manner that we have requested and outputs the
result in some way.
● During the processing phase, other data, may be needed apart from the
inputted. This data will exist in the storage of the computer system and
will be used during the processing phase.
● Furthermore, any new information that may arise from the processing
phase may also be saved in the storage.
The input, process and output model
Computer Systems
● computer system accepts data or instructions as input from an input
device (from a keyboard, a sensor, a digital camera button etc.).
● Data or instructions are then processed by the computer system. It may
be the case that other data or instructions, apart from the input, are
necessary during processing.
● These exist in the storage and may be loaded and used. Finally, the
computer system outputs the processed data into information that we
can see and use (using a monitor, speakers, a printout, etc.).
● This output is also saved on the storage (memory).
CPU
Central processing unit:
● The CPU is a hardware component of a computer system and can perform
basic arithmetic, logical or input/output operations, in order to process
data from input devices into useful information.
● The CPU is the ”brain” of a computer system and can process data very
quickly but can only process data by following instructions — it cannot
think for itself.
● The CPU can also be referred to as the processor or chip.
CPU
The CPU contains the:
● control unit (CU)
● arithmetic logic unit (ALU)
● memory address register (MAR)
● memory data register (MDR)
CPU
The CPU elements:
● The control unit (CU) is responsible for the operation of the CPU. It controls
the retrieval of instructions from the primary memory as well as the sequence
of their execution.
● The arithmetic logic unit (ALU) performs all the basic arithmetic, logical or
input/output operations.
● The CU is responsible for providing the ALU with the data that needs to be
processed as well as the instructions of how the data should be processed
Binary
That means that all the data and instructions that are stored in a computer system are
stored in sequences of binary digits that can take only two possible values, 1 and 0.
Thus a binary digit (bit) is the basic unit of information in computer systems and can have
only two values: either 1 or 0. Eight bits form a byte.
1 Byte = 8 bits
A bit is denoted by the small letter b, whereas a byte is denoted by the capital letter B. Thus,
1B = 8b. One byte can store a single character (ex. the letter A).
Binary
Convert the binary number, 11101110, into a denary number.
The equivalent denary number is 128 + 64 + 32 + 8 + 4 + 2 = 238
Binary
Converting from denary to binary
Consider the conversion of the denary number, 142, into binary:
Method 1
The denary number 142 is made up of 128+8+4+2 (that is,142–128=14;14–8=6; 6 – 4 = 2; 2 – 2
= 0; in each stage, subtract the largest possible power of 2 and keep doing this until the
value 0 is reached. This will give us the following 8-bit binary number:
Binary
Method 2
This method involves successive division by 2.
Start with the denary number, 142, and divide it by
2. Write the result of the division including the
remainder (even if it is 0) under the 142 (that is, 142
÷ 2 = 71 remainder 0); then divide again by 2 (that is,
71 ÷ 2 = 35 remainder 1) and keep dividing until the
result is zero.
Finally write down all the remainders in reverse
order →
Hexadecimal
The hexadecimal number system is very closely related to the binary system. Hexadecimal
(sometimes referred to as simply ‘hex’) is a base 16 system and therefore needs to use 16
different ‘digits’ to represent each value.
Because it is a system based on 16 different digits, the numbers 0 to 9 and the letters A to F are
used to represent each hexadecimal (hex) digit. A in hex = 10 in denary, B = 11, C = 12, D = 13, E = 14
and F = 15.
Converting from binary to hexadecimal
Converting from hexadecimal to binary
Converting from hexadecimal to denary
Converting from denary to hexadecimal
RAM
● RAM is a general—purpose storage area
meaning that the data stored can be
overwritten .
● This allows data and instructions to be loaded
for execution and use whenever they are
necessary.
● However, RAM is volatile, which means that
whenever power is lost the contents of its
memory are wiped (ex. if an unsaved
document with changes is open when the
power is lost, all the changes that had been
made will be lost.)
ROM
● ROM is used to store instructions and data
and cannot be overwritten.
● This means that the instructions that are
embedded in ROM cannot be changed, even if
power is lost, and as such is considered non-
volatile memory.
● ROM is used to store programs and
instructions that do not need to be updated
or change (ex. the start—up instructions of the
operating system)‘
RAM & ROM
● The RAM stores the executing program instructions as well as any data that is needed.
● Instructions and data in the RAM are stored in unique memory locations and every such
location has an address as well as content . The content is where the instructions and data
reside, whereas the memory location is used by the CU to find, retrieve and access the data in
order to send it to the ALU for processing.
● Similar to the RAM, the ROM holds instructions and data in unique memory locations. Every
such location has an address as well as content. Unlike the RAM however, the ROM is used
to store permanent instructions and data that cannot be changed and are used to boot
and operate the computer. As such, nothing can be altered in the ROM.
RAM & ROM
● ROM cannot be written to, but RAM can be written to.
● ROM holds the (BIOS) Basic Input / Output System, but RAM holds the programs
running and the data used.
● ROM is much smaller than RAM.
● ROM is non-volatile (permanent), but RAM is volatile.
Virtual
memory
● Virtual memory is a temporary memory made on storage drive to be use as an
additional memory in case the RAM is running low.
● Usually virtual memory stored in other storage devices and will be used when
needed.
● Virtual memory also manage automatically by the system unless you want to
increase the size.
Memory paging
● Memory paging is a memory management scheme that eliminates the need
for contiguous memory allocation, breaking physical memory into fixed-size
blocks called pages.
● When a program requires more memory than is physically available, the operating
system swaps pages in and out between RAM and disk storage, allowing efficient
use of limited memory.
● This process helps manage memory more flexibly, but excessive paging can lead to
performance degradation due to slower disk access times.
"Contiguous" refers to things that are connected or touching in a sequence without any gaps. In
the context of memory allocation, contiguous memory allocation means that a program's
memory is allocated in a single, uninterrupted block. Contiguous memory can help with
performance but can lead to fragmentation, making it harder to find large enough blocks for new
allocations as memory fills up.
Memory paging
● Memory paging is a memory management technique for controlling how a
computer or virtual machine's (VM's) memory resources are shared.
● A computer can address memory beyond the amount physically installed on the
system. This non physical memory, which is called virtual memory, is actually a
section of a hard disk that's set up to emulate the computer's RAM.
● The concept of virtual memory comes from a time when physical memory, the
amount of RAM installed on a computer, was extremely expensive. The portion of
the hard disk that acts as physical memory is called a page file.
Memory paging
● When a computer runs out of RAM, the operating system (OS) will move pages
of memory over to the computer's hard disk to free up RAM for other
processes. This ensures that the operating system will never run out of
memory and crash.
● Excessive reliance on memory paging can hinder performance since RAM is
significantly faster than disk memory. When the operating system frequently
swaps pages, it must wait for disk access, leading to delays. The more a
workload depends on swap files, the more it adversely affects overall
performance
Memory paging
approach
Approaches to memory paging in a virtual environment include:
● Smart paging - used only during a VM restart when there is no memory available
and none can be reclaimed.
● Hypervisor swapping - provides long-term page swap support for a certain
amount of memory reclamation. Because hypervisors generally have no insight
into VM memory, however, the data swapped out may routinely need to be
swapped back which can degrade performance.
● Memory ballooning - forces the VM's guest operating system (OS in VM) to decide
which memory pages are less important and swap them to disk.
Virtual
memory
CPU block diagram
CPU COMPONENTS
Control UNIT (CU)
The CU provides several functions:
● it fetches, decodes and executes instructions
● it issues control signals that control hardware components within the CPU
● it transfers data and instructions around the system
Registers
● The CU contains various registers .
● In general, a register is a small storage location that can hold data, usually a
multiple of 8 bits.
● The basic registers in the CU are the memory address register (MAR) and the
memory data register (MDR).
● The MAR holds the memory address of the data to be used by the ALU, so that
the ALU can fetch the corresponding content from the memory and process it
accordingly.
Registers
● The MAR may also hold the memory address of where data that has been
processed will need to be stored. In order for the MAR to communicate with the
primary memory, a connection is necessary. This connection is accomplished by the
Memory (Address) Bus.
● The MDR holds the data that is to be used by the ALU and then saved to the RAM.
● The MDR is closely related to the MAR, since whichever memory address location
the MAR is holding, the corresponding data will be loaded onto the MDR for
processing by the ALU.
● After the processing has taken place, the ALU places the result onto the MDR and the
data is copied to the memory address location in RAM specified by the MAR. The
connection between the RAM and the MDR is accomplished by the Data Bus.
Registers
Registers are small amounts of high-speed memory contained within the CPU.
They are used by the processor to store small amounts of data that are needed during
processing, such as:
● the address of the next instruction to be executed
● the current instruction being decoded
● the results of calculations
Registers
Different processors have different numbers of registers for different purposes.
Most have some, or all, of the following:
● program counter (PC)
● memory address register (MAR)
● memory data register (MDR)
● current instruction register (CIR)
● accumulator (ACC)
BUSes
A bus is a high-speed internal connection. Buses are used to send control signals and
data between the processor and other components.
Three types of bus are used.
● Address bus - carries memory addresses from the processor to other components such
as primary storage and input/output devices. The address bus is unidirectional.
● Data bus - carries the data between the processor and other components. The data
bus is bidirectional.
● Control bus - carries control signals from the processor to other components. The
control bus also carries the clock's pulses. The control bus is unidirectional.
CACHE
● Cache is a small amount of high-speed random access memory (RAM) built
directly within the processor.
● It is used to temporarily hold data and instructions that the processor is likely
to reuse.
● This allows for faster processing, as the processor does not have to wait for the
data and instructions to be fetched from the RAM.
CACHE L1
L1 and L2 refer to different levels of cache memory used in computer architecture
to speed up data access for the CPU:
L1 Cache (Level 1):
● Location : This cache is built directly into the CPU chip.
● Speed : It is the fastest type of cache memory, providing the quickest access to
frequently used data and instructions.
● Size: Typically smaller in size, usually ranging from 16 KB to 128 KB.
● Function: It is divided into two parts: L1d for data and L1i for instructions.
CACHE L2
Location: This cache can be on the CPU chip (in some designs) or close to the CPU on
the motherboard.
Speed: Slower than L1 but faster than main RAM (system memory).
Size: Larger than L1, usually ranging from 128 KB to several megabytes.
Function: It serves as a secondary cache to store data and instructions that are less
frequently accessed than those in L1.
Both levels of cache help reduce the time the CPU spends waiting for data from the
slower main memory, improving overall system performance.
ALU
● Arithmetic logic unit (ALU)
● The ALU performs arithmetic and logical operations.
● The ALU has two main functions:
○ it performs arithmetic and logical operations (decisions).
○ it acts as a gateway between primary storage and secondary storage - data
transferred between them passes through the ALU.
CLOCK
● The CPU contains a clock which, along with the CU, is used to coordinate all of the
computer's components. The clock sends out a regular electrical pulse which
synchronises (keeps in time) all the components.
● The frequency of the pulses is known as clock speed.
● Clock speed is measured in hertz (Hz). The greater the speed, the more instructions
can be performed in any given moment of time.
● In the 1980s, processors commonly ran at a rate of between 3 megahertz (MHz) and 5
MHz, which is 3 million to 5 million pulses or cycles per second.
○ Today, processors commonly run at a rate of between 3 gigahertz (GHz) and 5 GHz,
which is 3 billion to 5 billion pulses or cycles per second.
Von Neumann
architecture
● Von Neumann architecture is the design upon which many general purpose
computers are based.
● The key elements of von Neumann architecture are:
○ data and instructions are both stored as binary digits
○ data and instructions are both stored in primary storage
○ instructions are fetched from memory one at a time and in order (serially)
○ the processor decodes and executes an instruction, before cycling around to
fetch the next instruction
○ the cycle continues until no more instructions are available
Von Neumann architecture
● A processor based on von Neumann architecture has five special registers which it
uses for processing:
○ the program counter (PC) holds the memory address of the next instruction to
be fetched from primary storage
○ the memory address register (MAR) holds the address of the current instruction
that is to be fetched from memory , or the address in memory to which data is to
be transferred
○ the memory data register (MDR) holds the contents found at the address held in
the MAR, or data which is to be transferred to primary storage
○ the current instruction register (CIR) holds the instruction that is currently being
decoded and executed
○ the accumulator (ACC) is a special purpose register and is used by the
arithmetic logic unit (ALU) to hold the data being processed and the results of
Von Neumann architecture
Harvard architecture
● In early computer systems, machine instructions were stored on punch cards and
data could be stored on another media such as magnetic tape.
● This kept the instructions and data entirely separate from one another, known as
the Harvard architecture.
● In modern computer systems this can be achieved by using a central processing unit
with two separate memory units, one to store machine instructions and another to store
data, which are connected by different buses.
● Punch card = a piece of card with holes made in specific area so that a computer
can read it. This was the original way to put data and software into a computer but
it is not used anymore.
Harvard architecture
The fetch-decode-execute cycle
The fetch-decode-execute cycle is a key feature of the von Neumann
architecture and consists of seven stages:
1. The memory address held in the program counter (PC) is copied into the
memory address register (MAR).
2. The address in the program counter is incremented (increased) by one.
The program counter now holds the address of the next instruction to be
fetched.
3. The processor sends a signal along the address bus to the memory
address held in the MAR.
The fetch-decode-execute cycle
The fetch-decode-execute cycle is a key feature of the von Neumann
architecture and consists of seven stages:
4. The instruction or data held in that memory address is sent along the data
bus to the memory data register (MDR).
5. The instruction or data held in the MDR is copied into the current
instruction register (CIR).
6. The instruction or data held in the CIR is decoded and then executed.
Results of processing are stored in the accumulator (ACC).
7. The cycle returns to step one.
Cache memory & RAM
● Cache memory is nearer to the CPU than RAM.
● Cache memory is much faster than RAM.
● Cache memory is more expensive than RAM.
● Cache memory is separated in L1 and L2.
L1 (level 1) cache is placed on the microprocessor itself whereas L2 (level
2) cache is placed between the primary memory and the microprocessor.
L1 cache is the fastest compared to L2 and L3 is the slowest)
RAM
RAM has two main types :
● Dynamic RAM (DRAM)
○ Dynamic RAM (DRAM). It's called "dynamic" because it requires
constant refreshing to retain its data.
● Static RAM (SRAM)
○ Static RAM (SRAM) is a type of RAM that stores data using
flip-flops, which are stable circuits made of multiple transistors that
retain their state (either 0 or 1) as long as power is supplied. This
ability to maintain data without the need for refreshing is what
makes it 'static’.
RAM
RAM has two main types :
● Dynamic RAM (DRAM)
● Static RAM (SRAM)
SRAM is faster but more expensive than DRAM, and as such DRAM is
preferred for the main RAM of a computer system . However, a small amount
of SRAM is placed between the main RAM and the processor and it is called
cache.
As such, cache is a smaller and faster RAM (SRAM) that temporarily stores
instructions and data so that the processor does not need to access the slower
main memory (DRAM).
RAM
Feature DRAM SRAM
Storage method Capacitor & transistor (needs Flip-flops (no refreshing)
refreshing)
Speed Slower, higher latency Faster, lower latency
Density and cost More dense, cheaper per bit Less dense, more expensive
per bit
Latency in RAM refers to the delay between when a memory request is made (such as reading or writing data) and when the
data is actually available for use. It's the time it takes for the RAM to respond to a request after it has been issued by the
processor or controller.
RAM latency measures the waiting time between sending a command to the memory and receiving the data. Lower latency
means faster memory performance because the system can access the data more quickly.
SECONDARY MEMORY
● Secondary memory refers to non-volatile storage devices, such as hard
drives, SSDs, and optical disks, used for long-term data storage and
retrieval in a computer system.
● Secondary memory is known as persistent storage because it
retains data even when the computer is powered off, ensuring
long-term data preservation.
● Furthermore, secondary memory has a relatively high capacity to
hold data compared to the primary memory.
SECONDARY MEMORY
● Hard drive (a.k.a. hard disk)
● CD-RW, DVD-RW
● USB Flash drive
● Secure Digital (SD) or Compact Flash (CF) card Zip disk
● Floppy disk
● Magnetic tape
PRimary vs secondary
memory
● Most computers are equipped with a smaller amount of primary memory
and a larger amount of secondary memory.
● Primary memory is volatile, which means it does not retain data when the
power is turned off.
● Primary memory is more expensive compared to secondary memory.
Primary memory is much faster than secondary memory.
● Primary memory is directly accessed by the CPU.
● Secondary memory is not directly accessible by the CPU.
● Secondary memory is non-volatile, which means it retains data when the
power is turned off.
INSTRUCTION CYCLE
● It is the basic operation cycle of a computer, taking place in a definite
time period, during which one instruction is fetched from memory and
executed.
● It typically consists of four stages: fetch, decode, executer and store.
Persistent storage
● Persistent storage is any data storage device that retains data after power
to that device is shut off. It is also sometimes referred to as non-volatile
storage.
● Magnetic media, such as hard disk drives and tape are common types of
persistent storage, as are the various forms of Optical media such as DVD.
● Examples of persistent storage include hard disk drives (HDDs),
solid-state drives (SSDs), flash memory (such as USB sticks), and cloud
storage services
● Persistence data:
○ The data which is available after fully closing the application. This type of
data must be save into shared preference or database or internal or
external memory
NON-Persistent storage
● Non-persistent storage is typically used for logging information, such as
system logs or container logs, development testing, or when you want to
access data from the host's file system.
● Volatile storage
● Example of non-persistent storage are RAM and cache.
● Non- persistence data:
○ The data which is not available after fully closing the application. we
can say that non - persistence data mean volatile data that available
during the execution of the application.
Operating system
● An operating system (0S) is a set of
software that controls the
computer’s hardware resources
and provides services for computer
programs.
● It is a very important part of a
computer system since it acts as an
intermediary between software
applications (i.e. programs) and the
computer hardware.
Operating system Services
● Peripheral communication
● Memory management
● Resource monitoring and multitasking
● Networking
● Disk access and data management
● Security
Peripheral communication
Peripheral devices are all the hardware components of the computer
system that reside outside the CPU. Examples of peripheral devices
include keyboards, monitors, mice, printers, microphones, etc. The
operating system is responsible for communicating directly with the
hardware and providing an interface between hardware devices and
applications. This allows for applications to use hardware devices in a
trouble-free manner.
Memory management
An operating system (OS) is responsible for all the memory that is
available in a computer system. This means that an OS manages how
the memory is used by applications and ensures that one application
does not interfere with memory that is being used by some other
application. If one application interferes with another application’s
memory, the latter may stop functioning or its data may be affected or
overwritten.
Memory management function
● The OS deals with different passwords and the equivalent access
levels. This ensures that only appropriate users can access particular
files.
● Different uses have different access levels and different rights (add a
file, edit a file, delete a file, View a file etc.).
Resource monitoring &
multitasking
Multiple applications may run on a computer system at any one time,
appearing as though they are performing tasks simultaneously. Most
computer systems however have a single CPU that can perform a single
action at any particular time. That means that applications must share
the CPU time in order to accomplish their goal. This is known as
multitasking and it is a core OS service.
Networking
An operating system manages connections to and interactions with
networks of other computer systems so as to allow the sharing of
resources (such as files and printers). Networking is essential to
modern computer systems, most connected with either a local area
network or the Internet. An operating system acts as an intermediary
between applications and networks, allowing applications to interact
with networks in a straightforward manner.
Disk access and
data management
An important function of an operating system is its ability to access
data stored in memory and disk. Data are stored using files, which are
structured in such a way so as to make better use of the space
available to the system, as well as to provide reliability and fast access
times. The OS is responsible for keeping track of these files, as well as
which files are being used by which applications so that an application
does not overwrite another applications‘ files. The OS is also
responsible for coordinating the transfer of data from the disk files into
Security
● The most common but effective method of protection is to
provide some form of identity to the user that will allow his/her
authentication.
● Most often a username and a password must be provided.
● However, other methods of authentication may be used, such as
magnetic cards or biometric data.
Spreadsheet vs DBMS
● DBMS could be used for various data associations that cannot be
created with spreadsheets
● DBMS manages databases and serves a lot of users
● A Database Management System preserves data integrity easier.
● A spreadsheet can be used to produce charts and graphs using
automated software tools.
● A spreadsheet can hold a limited amount of information.
● A spreadsheet usually serves the needs of a single person.
● Spreadsheet software can perform a lot of mathematical functions
and perform data analysis.
Lingua franca
● A lingua franca is a language that is used as a ”bridge” language to
make communication possible between people who do not have the
same mother tongue.
● For example, English is the native language in the United Kingdom, but
it is used as a lingua franca in the Philippines in order for all
foreigners and natives to communicate with each other.
02
Logic gates
Boolean operators and truth tables
Boolean operators
● Boolean operators are used to connect and compare the relationship
between arguments. The result will be either TRUE or FALSE.
● There are six Boolean operators available: AND, OR, NOT, NAND, NOR
and XOR.
Boolean algebra
● Boolean algebra and truth tables can be used to describe logical
expressions.
● The most common Boolean operators are AND, OR and NOT (always in
capitals).
● Each operator has a standard symbol that can be used when drawing
logic gate circuits.
Boolean operators
Truth tables
● Truth tables are a way of showing all the possible outputs for inputs in
a logical expression. Logic gates, used in electronics and therefore
computer circuits, are based on truth tables.
● More complex expressions can combine several inputs and outputs. In
the truth tables, 1 means TRUE and 0 means FALSE.
Truth tables
NOT (Logic gate)
● A NOT gate has just one input. The output of the circuit will be the
opposite of the input. If 0 is input, then the output is 1. If 1 is input, then
0 is output.
● The Boolean expression is written as Q = NOT A.
NOT (Logic gate)
NOT (Truth table)
AND (Logic gate)
● An AND gate can be used on a gate with two inputs. AND tells us that
both inputs have to be 1 in order for the output to be 1.
● The Boolean expression is written as Q = A AND B.
AND (Logic gate)
AND (Truth table)
OR (Logic gate)
● The OR gate has two inputs. One or both inputs must be 1 to output 1,
otherwise it outputs 0.
● The Boolean expression is written as Q = A OR B.
OR (Logic gate)
OR (Truth table)
XOR (Logic gate)
● The exclusive OR gate works the same as an OR gate, but will output 1
only if one or the other (not both) inputs are 1.
● The Boolean expression is written as Q = A XOR B.
XOR (Logic gate)
XOR (Truth table)
NAND (logic gate)
NAND (TRUTH TABLE)
NAND (Boolean expression)
NOR (logic gate)
NOR (TRUTH TABLE)
NOR (Boolean expression)
Boolean
practice
Boolean
practice
Boolean
practice
Logic gate
examples
Logic gate
Truth table
circuit
A B C D X
A+B D.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
Logic gate
Truth table
circuit
A B C D E X
A.B A NAND C D+E
0 0 0 0 1 1
0 0 1 0 1 1
0 1 0 0 1 1
0 1 1 0 1 1
1 0 0 0 1 1
1 0 1 0 0 0
1 1 0 1 1 1
1 1 1 1 0 1
binary
Binary Number system
○ A binary number system is one of the four types of number
systems, and it is used to define a number in a binary system.
○ A binary number system represents a number in terms of only two
digits, i.e., 0 (zero) and 1 (one).
○ In the word “binary”, “bi” means “two”. As a result, this draws the
line back to the representation of a number using the numbers 0
and 1 only.
Decimal vs Binary
○ Here are some equivalent values:
Binary to decimal
○ 32+8+4+2 = 46
Binary fractions table
24 23 22 21 20 2-1 2-2 2-3 2-4
16 8 4 2 1 1/2 1/4 1/8 1/16
16 8 4 2 1 0.5 0.25 0.125 0.0625
Binary fractions
● Find the binary of 4.5
○ 4 is 0100
○ 0.5 is 0 ½ or 2-1
● So the binary of 4.5 is 0100.1000
Binary fractions
● Find the binary of 12.3125
○ 12 is 1100
○ 0.3125 is is 2-2 and 2-4 (0.25 and 0.0625)
● So the binary of 12.3125 is 1100.0101
Binary fractions
Binary fractions
● In the Decimal System there are Ones, Tens, Hundreds, etc
● In Binary there are Ones, Twos, Fours, etc, like this:
Binary fractions
○ Imagine that we need to understand what quantity is
represented by the number 6275 base 10 or 6275 10. The table
below depicts the digits of the number as well as the multiplier.
○ The value represented by the number 6275 10
is:
○ 6*1000 + 2*100 + 7*10 + 5*1 = 6275
Binary fractions
○ Imagine that we need to understand what quantity is
represented by the number 0.627 base 10 or 0.627 10 . The table
below depicts the digits of the number as well as the multiplier.
○ The value represented by the number 0.627 10
is:
○ 6*0.1 + 20.01 + 7*0.001 = 0.627
Boolean notation
● Logical expressions can also be expressed using Boolean algebra
notation. Instead of writing the words AND, OR, NOT or XOR it is often
written using the following shorthand notation.
Boolean identities and rules
Boolean identities and rules
A AND A = A
● How?
○ If A is 0, then the expression is 0 AND 0 = 0, which is equal to A.
○ If A is 1, then the expression is 1 AND 1 = 1, which is equal to A.
Boolean identities and rules
A OR A = A
How?
● If A is 0, then the expression is 0 OR 0 = 0, which is equal to A.
● If A is 1, then the expression is 1 OR 1 = 1, which is equal to A.
Boolean identities and rules
A AND NOT A = 0
● How?
○ If A is 1, then NOT A = 0.
○ Then the expression becomes 1 AND 0 = 0.
○ If A is 0, then NOT A = 1.
○ Then the expression becomes 0 AND 1 = 0.
Simplifying Boolean expressions
○ X = A AND B OR A AND NOT B
○ X = A AND (B OR NOT B)
○ X = A AND 1
○ X=A
Boolean
simplification
LAWS of boolean algebra
Symbols and shapes for boolean
operators
Simplifying Boolean expressions
Simplifying Boolean expressions