You are on page 1of 38

Informática

Ing. Aeroespacial

Computers

C3: Digital systems

DISCA: Departamento de Informática de Sistemas y Computadores


Rev. 06
Introduction Informática

Do you know that computers can be constructed using a


single basic element?
Which are the foundations of these systems?
Do they depend only on the current state?

2
Digital systems Informática

Boolean algebra
Combinational and sequential systems
Digital systems
Examples of digital systems in avionics

3
Boolean algebra Informática

First, some algebra…


Definition:
- Boolean algebra is the branch of algebra in which the values of the
variables are the truth values true and false, usually denoted 1 and 0
Based on predicates: sentences that assert or deny unambiguously an
attribute. Example: “Mary is wearing a flower on her head” (true / false)
Boolean domain B={0, 1}, 0→false, 1→true.
Operators:
- AND: x ⋀ y , (x ∙ y) - true if both x and y are true and false otherwise.
‣ Example: The machine starts working if “The green light is on” ∧ “The
button is pushed”.
- OR: x ⋁ y , (x + y) - true if either x or y are true and false otherwise.
‣ Example: The machine stops working if “The button is pushed” ∨ “There is
an emergency”.
- NOT: ¬x , x - true if x is false and false if x is true
‣ Example: The machine is working if ¬“The red light is on”.
4
Boolean algebra Informática

Laws
Laws similar to ordinary algebra:
- Commutativity of ∨ and ∧: x∨y=y∨x x∧y=y∧x
- Associativity of ∨ and ∧: x∨(y∨z) = (x∨y)∨z x∧(y∧z) = (x∧y)∧z
- Distributivity: x∨(y∧z) = (x∨y)∧(x∨z) x∧(y∨z) = (x∧y)∨(x∧z)
Additional laws:
- Idempotence of ∨ and ∧: x∨x=x x∧x=x
- Absorption 1 and 2: x∨(x∧y) = x x∧(x∨y) = x
- De Morgan 1 and 2: ¬(x∧y) = ¬x ∨ ¬y ¬(x∨y) = ¬x ∧ ¬y
- Opposites: x ∨ ¬x = 1 x ∧ ¬x = 0
- Neutral elements: x∨0=x x∧1=x

5
Boolean algebra Informática

Laws (alternative notation)


Laws similar to ordinary algebra:
- Commutativity of + and ·: x+y=y+x, x·y=y·x
- Associativity of + and ·: x+(y+z) = (x+y)+z x·(y·z) = (x·y)·z
- Distributivity: x+(y·z) = (x+y)·(x+z) x·(y+z) = (x·y)+(x·z)
Additional laws:
- Idempotence of + and ·: x+x=x x· x=x
- Absorption 1 and 2: x+(x·y) = x x·(x+y) = x
- De Morgan 1 and 2: (x·y) = x + y (x+y) = x · y
- Opposites: x+x=1 x·x=0
- Neutral elements: x+0=x x·1=x

6
Boolean algebra Informática

You can test it using Matlab


Remember “Disco” example
- Commutativity of + and ·:
if (age > 20) && (age < 40) ≡ if (age < 40) && (age > 20)
- Idempotence of + and ·:
‣ if (age > 20) && (age > 20) ≡ if (age > 20)
- Absorption 1 and 2:
‣ if (age > 20) && ((age > 20) || handsome) ≡ if age > 20
- De Morgan 1 and 2:
‣ if ~((age > 20) && (age < 40)) ≡ if (~(age > 20)) || (~(age < 40))
- …

7
Digital systems Informática

Boolean algebra
Combinational and sequential systems
Digital systems
Examples of digital systems in avionics

8
Combinational and sequential systems Informática

REMEMBER: Continuous time vs. discrete time systems


Continuous-time system: inputs and outputs are defined over a time domain
which is continuous. Example: T=[0,5]
Discrete-time system: the time domain is a discrete set of values. Example
T= {0,1,2,3,4,5}. Inputs are only sampled at time instants in the domain and
outputs are reevaluated each time the inputs are sampled.

Continuous-time Y(t) = adder(2,t) Discrete-time Y(t) = adder(2,t)

?
?

9
Combinational and sequential systems Informática

A/D conversion A/D conversion


Analog and digital signals process
Digital conversion
uses 4 bits.
This allows 24=16
levels:
(0..15V)
Analog signal The analog signal
(voltage) is sampled
at fixed periods of
time

Digital signal ?
A voltage of 9.9V is
rounded to a value ?
of 10, that in binary
is 1010.

10
Combinational and sequential systems Informática

Definition
Combinational system: outputs at time t are exclusively a function of the
inputs at time t:

Sequential system: outputs at time t depends on the present inputs at time t,


and on the history in time of the inputs:

NOTE: The time in the discrete time domain is usually represented with an
integer variable (typically i,j,k).

11
Combinational and sequential systems Informática

Sequential systems
Example: accumulator (discrete time integration)

Note: Y(k) = 0 for k<0

12
Combinational and sequential systems Informática

Sequential systems
Memory property: allows a system to store and maintain a given value over
time.
Register: system with the memory property.
- It samples a value when it is triggered by a CLK signal and it keeps it stored
or memorized until a new CLK signal.
- A CLK signal generates a pulse at a constant frequency, and it is used to
coordinate the actions of a digital system.

13
Combinational and sequential systems Informática

Sequential systems
Example: accumulator
- Implementation with a register

accumulator
X1
adder Y
register
CLK

14
Combinational and sequential systems Informática

Implementing combinational systems in Matlab


Combinational systems can be mapped to Matlab functions.

inputs
outputs

invocation

composition: function calls

15
Combinational and sequential systems Informática

Implementing sequential systems in Matlab


The memory property can be implemented using persistent variables.
- Not created and destroyed on each function invocation.
Not “pure functions”.

16
Digital systems Informática

Boolean algebra
Combinational and sequential systems
Digital systems
Examples of digital systems in avionics

17
Digital systems Informática

Logic gates
It is an idealized electronic device implementing a Boolean primitive
function.
They are combinational systems.
Behavior described by truth tables.

X1 X1·X2 X1 X1+X2
X2 X1 X1
X2

AND gate OR gate NOT gate


Digital systems Informática

Logic gates
Additional gates

X1 X1⊕X2
X2

XOR gate

X1 X1·X2 X1 X1+X2 X1 X1⊕X2


X2 X2 X2

NAND gate NOR gate XNOR gate


19
Digital systems Informática

Everything can be built from NAND gates…


It’s a UNIVERSAL gate.
OR gate?

20
Digital systems Informática

It is easy to implement….

21
Digital systems Informática

Megaprocessor… too freaky!!!


http://www.megaprocessor.com

22
Digital systems Informática

Boolean functions
Function of the form f: Bn → B, B={0, 1}
- f(x1,x2,...,xn), where xi are Boolean variables.
They can be represented using expressions or truth tables.
- Example: majority voting of three binary juries

23
Digital systems Informática

Boolean functions
Shannon Expansion Theorem: A boolean function can be expanded in two
canonical forms: sum of minterms and product of maxterms.
- Example: majority voting of three binary juries

•Sum of minterms: by 1’s

•Product of maxterms: by 0’s

24
Digital systems Informática

Implementation of boolean functions using logic gates


Expression "should” be simplified before implementing it.
‣ We are not doing it now. Next year!

25
Digital systems Informática

Boolean expressions in programming


Matlab has a data type called logical to support Boolean variables.
Logical operators:

Example:
% voting.m

26
Digital systems Informática

Sequential systems
They have the memory property: they can keep the value of an input even
when the input changes.
The truth table must consider:
- Xi(k) : inputs at time instant k
- Yi(k − 1) : previous outputs (at time k-1)
Represented using a chronogram.
Example:

27
Digital systems Informática

Basic sequential circuits


Registers: they memorize the value of the last input.

X
register Y
CLK

RS-bistable: they memorize a value that can be Set (S) or Reset (R).

R
RS
CLK Q
bistable
S

28
Digital systems Informática

Boolean algebra
Combinational and
sequential systems
Digital systems
Examples of digital
systems in avionics

29
Digital systems in avionics Informática

Example of a combinational system (1)


Landing gear door warning logic.
- There are five switches that detect whether or not the respective landing gear door is
open.
- There are five warning indicators in the overhead panel that show which door(s) are
open.
- There is a master indicator in the pilot’s panel that provides a warning if some of the
doors is open.

30
Digital systems in avionics Informática

Example of a combinational system (2)


Normal flight state
- All doors are closed

31
Digital systems in avionics Informática

Example of a combinational system (3)


Warning state
- Nose door open

32
Digital systems in avionics Informática

Example of a combinational system (4)


Warning state
- Nose and left wing doors open

33
Digital systems in avionics Informática

Example of a sequential system (1)


The APU (Auxiliary Power Unit) starter logic
- During flight electric supply is generated by the engines.
- The APU is started after landing and in case of failure.
Airbus 320

Three inputs:
- APU start button
X1
- APU shutdown button X2
- APU running: detects if it is running Y
Functionality:
- You should press the APU START button
to start it.
- A timeout timer stops the starter if the
APU does not start in 60 sec in order not to
exhaust the battery.

34
Digital systems in avionics Informática

Example of a sequential system (2)


60 sec
a b c d
APU START
APU SHUTDOWN
APU RUNNING
X1

X2
Y

X1

X2

(a) Initial state


35
Digital systems in avionics Informática

Example of a sequential system (3)

36
Digital systems in avionics Informática

Most systems can be implemented with Digital Systems


Typical example of 60-70s cabin (DC-9)

Nevertheless, systems were getting more complex so....


37
Sample: Airbus A380 Informática

And now, practically all systems are computer based

38

You might also like