Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 37

MAC addresses

• Each network interface card needs its own Media


Access Control Address (MAC address)

MAC address permanently


stored on network
interface card
MAC addresses
• The first three bytes (24 bits) of the MAC address
contains a number that represents the manufacturer
• The second part of the number is the serial code which is
given to the hardware device by the manufacturer

1f-38-69-ba-9f-0c
Manufacturer code Serial code
Internet Protocol Address ( IP)
• IP addresses is the identifier/ name for a device on a
network
• IP version 4 (IPv4) addresses are made from
four bytes
• They are usually represented as four denary numbers
separated by full stops such as:

192.168.52.211
8 bits – Each part
32 bits – 4 parts
Internet Protocol issues
• The problem with 32-bit IP addresses is that there
aren’t enough of them
• As more and more devices are added to the Internet we need
an IP address system that can address all of them
• We therefore need to use a larger binary number than a
32-bit address
IPv6
• IPv6 (version 6) makes use of 128-bit numbers
allowing for a staggering number of devices to
be addressed

• IPv6 addresses are separated into eight groups


each containing four hex digits and separated by
a colon – for example:

0123 : 4567 : 90ab : cdef : 0123 : 4567 : 89ab : cdef


Dynamic and Static IP addresses

• Dynamic IP addresses are assigned to the devices when


they connect to network. Dynamic IP address is assigned
from the pool of the address by the DHCP to the devices. It
changes every time device connects to the network
• If the IP address is always the same, it is known as a
static IP address
Role of the router
• A router directs the traffic inside and outside of the
network.
• A router has DHCP that assigns IP address to the
devices connecting to the router.
IPv4 and IPv6
• You need to be aware of the characteristics and
differences of IPv4 and IPv6
IPv4 IPv6
Address size 32-bit 128-bit
Number of unique addresses 4.3 billion 340 trillion trillion trillion
Separators Full stops . Colons :
Security Improved security
Assignment of IP address DHCP server IPv6 devices can
configure themselves
automatically
(Autoconfiguration) or
use DHCPv6
Writing IPv6 addresses
• As IP addresses are so long, there are a number of
ways in which they should be written and shortened
Rule Example Correct way to
write
Hex digits should be in 58B3:DC97 58b3:dc97
lowercase
Leading zeros don’t need to 10bc:00b3:0000 10bc:b3:0
be written for each set of
four hex digits, but keep one
digit if they are all zeros
The longest set of zeros, 10bc:b3:0:0:0:0:0:1a 10bc:b3::1a7
that is more than four hex 7
digits, is replaced with ::
(Except if it a single field of zeros)
The main components
of a computer
MAIN MEMORY

INPUT CENTRAL PROCESSING OUTPUT


DEVICES UNIT (CPU) DEVICES

SECONDARY
STORAGE
Components of the CPU
• The CPU has two major components called the
• Control Unit
• Arithmetic-Logic Unit (ALU)
• A register is a very fast
memory location in the
CPU itself
• Cache is located on the CPU –
it is slower to access than
registers but faster than RAM, it stores data that is frequently
accessed. It stores the data
which is frequently needed by the processor
Control Unit
The control unit coordinates and controls
all of the activities taking place within
the CPU
• It decodes instructions and executes them
• It receives signals from the system clock
• It directs the timing and control of other
parts of the CPU, much like the conductor
of an orchestra
The Arithmetic Logic Unit
• The ALU or Arithmetic Logic Unit is where the actual
arithmetic operations are done
• It also carries out logical operations such as those including
AND, OR and NOT

Main ALU
Memory Accumulator
X = 3 ADD X, Y 8
Y = 5
Accumulator
• The accumulator (ACC) is
where arithmetic and logic
results are temporarily stored,
much like the M+ function on
a calculator
• Instructions are loaded to primary
memory ( RAM/ IAS/ Main Memory)
Stored • Instructions are fetched from primary
program memory ( RAM) one by one to be
decoded and executed by the processor
Concept ( FDE Cycle).
Fetch Decode Execute

Stage What happens at this stage?

FETCH Instructions to be executed are fetched by the buses from the RAM and
stored in Registers in the processor

DECODE Instruction in CIR is decoded by the control unit and signal are sent to
execute the instruction

Execute ALU executes the instructions if instruction is to perform arithmetic or


logical or comparison operation. I/O ( input and output) instructions are
executed by the I/O devices.
Processor architecture
PC:
Program Counter – holds MAR:
the address of the next Memory Address Register – stores the
instruction address of the instruction to be executed
1
2
ACC:
Accumulator – 3
Temporarily stores 4
arithmetic results
5 LDA 10
6 ADD #4
ALU:
Arithmetic Logic 7 STO 11
Unit – performs 8
calculations and
logic expressions 9
MDR: 10 8
Memory data register – Stores the CIR:
data to be sent to the memory or Stores the current
received from the memory instruction ready to
be decoded and
executed
Buses
A bus is a set of parallel wires connecting two or
more components of the computer
• When the CPU wishes to access a
particular main memory location, it sends
the address requested to memory on the
address bus. It is un directional

• Data is sent from processor to


primary memory and other
components and vice versa through
this bus. It is bidirectional

• Control signals are sent on the control


bus to and from the processor to other
components , it is bidirectional
How an • Program counter (PC) holds address
/ location of the instruction to be
instruction is fetched from the IAS
• The address held in PC is sent to
fetched in MAR by the address bus then is sent
to memory
Von Neumann • The instruction/ data is fetched from
address in memory and send to
model. MDR using data bus
• Instruction in MDR is sent to CIR.
• PC is incremented to the address of
the next instruction to be fetched
• Instructions in the CIR is decoded by
the CU
• CU and ALU performs execution
Instructions / programs
CPUs fetch, decode and execute instructions
• In a high level language, you may program an instruction
such as
total  0
FOR i  1 TO 10 DO
total  total + i
ENDFOR

• The high level language


Instruction is converted to
Machine instruction that CPU understands
Instructions that CPU understands
• CPUs use very simple instructions known as
machine code or assembly language
• A high level instruction such as total  0 may use an
instruction such as LOAD ACC, #0
Machine instructions have
Opcodes and operands
When programming a processor a special language
called assembly code is used
• The program is then assembled into a binary form known as
machine code – this is what is run by the processor
• The assembly code (and machine code) make use of
opcodes and operands
• The opcode/ Mnemonic is the instruction and the operands
are the values that the instruction works on
Factors affecting CPU performance

Clock speed
Cache size
Cycles per second
measured in hertz (Hz) Cache on the CPU
is faster than RAM but
slower than registers

Number of cores
The number of duplicate
processing units (cores)
placed in one CPU
Clock speed
• Everything in a computer happens on the pulse of
the internal clock
• Therefore, the faster the clock speed, the faster the
instructions are processed

Clock speed 1GHz Clock speed 2GHz

Clock Control Unit Clock Control Unit

CPU CPU
Processor Speed
• One cycle per second = 1 hertz (Hz) = 1 instruction
carried out each second
• 1 kilohertz (kHz) = 1000 cycles per second
• 1 Megahertz (MHz) = 1,000,000 cycles per second
• 1 Gigahertz (GHz) = 1,000,000,000 cycles per second
Multi-core processors
• A dual-core processor has two processors in the
same integrated circuit, linked together
• A dual-core processor has the potential to perform two
instructions at the same time
• This allows twice as many instructions to be executed,
however, it doesn’t always perform at this rate as software
may not be able to take full advantage of both cores
• A quad-core processor has four linked processors
• Which processor would you prefer, a dual-core 1GHz, or a 3
GHz single core processor?
Effect on speed
• A quad-core processor working on many different
tasks simultaneously, under ideal conditions can be
up to four times faster than a single-core processor
• If the computer is running a single program, it is not
necessarily any faster, since the program may have
been designed to only run on one core. Even if there
are more than one core, this won’t improve much of
performance.
Cache memory
• Cache is a small amount of very
CPU
fast, expensive memory in the CPU
• It can be accessed faster than
regular main memory (RAM)
• this useful for recently/frequently Cache
used data?

Main Memory
Effect on speed of cache
• RAM is relatively slow memory to access and it is
further away from the processor than cache
• It takes longer to retrieve an instruction or data from RAM
than from cache
• Program instructions and data that are fetched are
stored in cache in case they are needed again soon
• If you have a ‘for’ loop in a program, for example, having all
the instructions in the loop in cache, speeds up execution
Levels of cache memory

Cache
The benefits of cache
• The data used most often by the CPU is held in
cache so is available extremely quickly
• This greatly reduces the time that the CPU has to wait for data
from main memory

• The size of the cache is a major factor in determining


the performance of the CPU. More instructions can be
stored if cache has more capacity.
Embedded computers
An embedded computer is a single microprocessor
that includes RAM, ROM and a CPU
An embedded computer is frequently used to control a device
using simple inputs
Microprocessor in embedded system
• A microprocessor is an integrated circuit that is all
contained on a single chip which is embedded in the
control systems, like security systems, cars
• Microcontrollers contain not only the
microprocessor, but also RAM and
ROM or flash memory for volatile and
non-volatile storage – this allows
for an entire computer to
be contained on one chip
Sensors in the embedded system
Motion (infra-red) Sensor Automatic doors, Burglar alarm systems, Gaming systems, inc accelerometer, Counting,
e.g. people or cars
Temperature Sensor Chemical process or reaction, Central heating (thermostat) / air-con, Greenhouses,
Ovens, refrigerators and freezers
Sound Sensor Burglar alarm systems, Leak detection system

Moisture / Humidity Sensor Clothes dryer ,Environmental control / greenhouse, air-con

Pressure Sensor Burglar alarm systems, Traffic light controls, Chemical processes
Liquid through pipes
Gas Sensor Pollution monitoring (river), Greenhouse environments, Confined areas (space craft,
aircraft), Fish tanks / aquariums
Carbon monoxide alarms
Light Sensor Controlling street lighting, Burglar alarms (beams of light), Automatic doors, Greenhouse
pH Sensor Water treatment plants, Pollution monitoring (river), Aquariums
Greenhouse
Working of an Embedded/ Control System

Identify/pick the correct sensor/s for the embedded system and then list the following steps
in the order
______Sensor captures the data from the system ( temperature , pressure, PH sensors)
ADC embedded within sensor converts the sensor's analogue readings to digital signals.
Digital signal is sent to the microprocessor
Microprocessor compares the reading with the already setup up thresh hold and if the
values are in acceptable range, then no action is taken,
otherwise, processor sends the signal to the output devices ( restart cooling, open window ,
set off an alarm).
Digital to analogue converter are used to send analogue signal to output device if analogue
signal is needed for the output device
The whole process repeats itself
Benefits and draw backs

You might also like