0% found this document useful (0 votes)
15 views25 pages

Ch1 P3

Uploaded by

adikari.seww
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views25 pages

Ch1 P3

Uploaded by

adikari.seww
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

COMPUTER

SYSTEMS
CS 1042

1ST YEAR 2ND SEMESTER


March, 2022

1
Data Vs. Signal
• Data – Information formatted in human / machine readable form
E.g. : voice, music, image, file

• Signal – Electrical or electromagnetic representation of data. Transmission media work


by conducting energy along a physical path; thus, to be transmitted, data must be
turned into energy in the form of electro-magnetic signals

• Transmission – communication of data through propagation and processing of signals.

2
Signal Representation
• Typically in 2D space, as a function of time, space or frequency.

• When horizontal axis is time, graph displays the value of a signal at one particular point
in space as a function of time.

• When horizontal axis is space, graph displays the value of a signal at one particular point
in time as a function of space.
Amplitude(volts)

3
Analog Vs. Digital

c. Analog Data d. Digital Data


4
Analog Vs. Digital (contd.)
Analog & Digital Data
• Analog Data - representation variable takes on continuous values in some interval.
E.g.Voice,Temperature, etc.
• Digital Data – representation variable takes on discrete (a finite & countable number of)
values in a given interval.
E.g.Text, Digitized images, etc.

Analog & Digital Signal


• Analog Signal – Signal that is continuous in time and can assume an infinite number of
values in a given range (continuous in time and value).
• Digital Signal – Signal that is continuous in time and assumes only a limited number of
values (maintains a constant level and then changes to another constant level).

5
Analog Circuit

6
Digital Circuit

7
Types of Digital Signal
Edges
• A single binary signal can have one of two possible transitions as shown in the figure.

• The first one, a transition from a logic 0 to a logic 1, is called a rising edge transition.

• The second one, a transition from a logic 1 to a logic 0 is called a falling edge transition.

Rising Edge Falling Edge


8
Types of Digital Signal (contd.)
Pulses

• A binary pulse occurs when a signal changes from one value to the other for a short
period, then returns to its original value.

• Example of this type of signal might be the power-on or reset buttons on a computer
(momentarily pressed, then released).

• There are two types of pulses. The first is called positive-going pulse, and it has an idle
state of logic 0 with a short pulse to logic 1. The other one, a negative-going pulse, has
an idle state of logic 1 with a short pulse to logic 0.

Positive-going Negative-going
9
Find the number of edges and pulses for the following diagrams

10
Periodic Pulse Trains

• It is a kind of non-sinusoidal waveform that is similar to a square wave.

• In this type of waveform, all measurements between any two subsequent, identical
parts of the waveform produce the same value.

• This value is referred to as the period, T, and it has units of seconds/cycle (read
seconds per cycle).

11
Periodic Pulse Trains (contd.)

• Consider two signals given below which have the same period. Their pulse widths,
however, are not the same.

• In signal ‘a’, tw is about one-fourth of the signal’s period while tw of signal ‘b’ is about one-
half of the signal’s period.
• The units of tw is seconds. Its value will always be greater than zero and less than the
period.
• A tw of zero implies the signal has no pulses, and if tw equalled the period, then the signal
would never go low.
12
Periodic Pulse Trains (contd.)

• It is also common to represent the rate of the pulses in a periodic pulse train with the
inverse measurement of the period.

• This measurement, called the frequency of the periodic pulse train has units of
cycles/second, otherwise known as Hertz(Hz).

• To determine the frequency of a periodic pulse train from the period, invert the
measurement for the period.

13
Exercises

1) If it takes 0.1 seconds for a periodic pulse train to make a complete cycle or

period, what is that waveform’s frequency?

2) If a computer’s system clock is 2 Gigahertz, what is the duration of its system

clock’s period?

14
Exercises (contd.)

3) The period of a signal is 100 ms. What is its frequency in kilohertz?

1 1
𝑓= =
𝑇 100 ×10−3

= 10 Hz

= 10−2 kHz

15
Exercises (contd.)

4) A Sine wave is offset 1/6 cycle with respect to time 0.What is its phase in
degree and radians?

1
𝑃ℎ𝑎𝑠𝑒 𝑉𝑎𝑙𝑢𝑒 = × 360
6

= 60°
2𝜋
= 60 × 𝑟𝑎𝑑
360
𝜋
= 𝑟𝑎𝑑
3

= 1.046 𝑟𝑎𝑑 16
Exercises (contd.)
5) If a periodic signal is decomposed into five sine waves with frequencies of
100, 300, 500, 700 and 900 Hz.What is its bandwidth?
Draw the spectrum, assuming all components have maximum
amplitude of 10 V.
𝐵𝑎𝑛𝑑𝑤𝑖𝑑𝑡ℎ, 𝐵 = 𝑓ℎ − 𝑓𝑙
= 900 − 100
= 800 𝐻𝑧

17
Exercises (contd.)
6) Assume you need to download a text documents at the rate of 100 pages
per second. A page is an average of 24 lines with 80 characters in each line.
What is the required bit rate of the channel? (Assume that, one character
requires 8 bits)

Bit Rate = 100 × 24 × 80 × 8


= 1,536,000 bps
= 1.536 𝑀𝑏𝑝𝑠

18
Pulse Width Modulation
• Duty cycle is the proportion of time during which a component, device,
or system is operated.

i.e., The duty cycle represents the percentage of time that a periodic signal
is a logic 1.

• Since the range of tw is from 0 to T, then the duty cycle has a range
from 0% (a constant logic 0) to 100% (a constant logic 1).

19
Exercise
Assume that a 1 kHz periodic pulse train is sent to an LED. What should
the pulse width be to make the light emitted from the LED one-third of its
full capability?

20
Cycles Per Instructions (CPI)
• CPI is a measure of how a given piece of code or the entire application is performing is to look at
the average number of cycles that are needed to retire an instruction.

• This is also an indication of how much latency is in the system and can be a valuable measure of how
an application is performing.

• To compare how one version of a part of the code is running to another version, since this is a ratio,
it is important to keep one of the values constant in order to understand if the optimization is
working.

• If more CPU cycles are being used, but more instructions are being executed, then the ratio could be
the same, but this measure will not show any improvement. The goal is to lower the CPI in certain
parts of the code as well as the overall application.

21
Example
Consider that, for the multi-cycle MIPS
Load 5 Cycles
Store 4 Cycles
R-type 4 Cycles
Branch 3 Cycles
Jump 3 Cycles
If a program has,
50 % R-type instructions
10 % load instructions
20 % store instructions
8% branch instructions
2% jump instructions

Then, what is the CPI Value ?


CPI = (4 × 50 + 5 × 10 + 4 × 20 + 3 × 8 +3 × 2 ) / 100 = 3.6 22
CPU Clock Cycle = 𝐼𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 𝐶𝑜𝑢𝑛𝑡 𝐼𝐶 × 𝐶𝑦𝑐𝑙𝑒𝑠 𝑝𝑒𝑟 𝐼𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 (𝐶𝑃𝐼)

CPU Time = 𝐶𝑃𝑈 𝐶𝑙𝑜𝑐𝑘 𝑐𝑦𝑐𝑙𝑒𝑠 × 𝐶𝑙𝑜𝑐𝑘 𝐶𝑦𝑐𝑙𝑒 𝑇𝑖𝑚𝑒

23
Exercise

Suppose a program (or a program task) takes 1 billion instructions to


execute on a processor running at 2 GHz. Suppose also that 50% of the
instructions execute in 3 clock cycles, 30% execute in 4 clock cycles, and
20% execute in 5 clock cycles.

What is the execution time for the program or task?

24
CHAPTER 02

25

You might also like