Você está na página 1de 21

Introdução a Sistemas Digitais

Sistemas analógicos processam sinais que variam no tempo e podem tomar qualquer valor
dentro de uma gama.

Em sistemas digitais sinais são modelados como se tomassem sempre um dos (dois) valores
discretos.

 reprodução de resultados;

 facilidade de projeto;

 programabilidade;

 desempenho;

 precisão;
Álgebra Booleana

Sistemas digitais binários usam dois valores discretos:

0-1 LOW-HIGH desligado-ligado FALSE-TRUE 0 volts-5 volts

A álgebra Booleana fornece a base matemática rigorosa baseada em lógica.

Variáveis – sinais lógicos

Valores – 0 e 1 (se uma expressão lógica é falsa, então toma o valor 0; caso

seja verdadeira, então toma o valor 1)

Operações – AND, OR, NOT

Bit (binary digit) – dígito que representa valores lógicos 0 e 1.7

Sistemas de numeração: notação

Sistemas digitais são construídos de circuitos que processam dígitos binários.

Num sistema de numeração posicional à posição de cada dígito é atribuído um peso. Para
uma base r  2, um dígito na posição i tem o peso ri.

Exemplos:

Sistema decimal

200710 = 2*1000 + 0*100 + 0*10 + 7*1

19.8510 = 1*10 + 9*1 + 8*0.1 + 5*0.01


Sistema binário

11001102 = 1*26 + 1*25 + 1*22 + 1*21 = 64 + 32 + 4 + 2 = 10210

101.00112 = 1*22 + 1*20 + 1*2-3 + 1*2-4

Sistema octal

35778 = 3*83 + 5*82 + 7*81 + 7*80 = 191910

35.778 = 3*81 + 5*80 + 7*8-1 + 7*8-2

Sistema hexadecimal

200716 = 2*163 + 7*160 = 819910

7D716 = 7*162 + 13*161 + 7*160 = 200710

A.2C16 = 10*160 + 2*16-1 + 12*16-2

Correspondência entre sistemas de numeração


Mudança de base: parte inteira
Mudança de base: parte fracionária
Representation of Negative Numbers

The most significant bit (MSB) of a number in this system serves as the sign bit;

a number is negative if and only if its MSB is 1.

Two’s Complement Representation

For n=4, the range is [-8, 7]:


Conversion between Decimal and Two’s Complement

1º – Division by two

2º – If there are empty bit positions left, fill them with 0s. Depending on the n bits!

3º – Do not exceed the allowed range of representable numbers: [-2n -1 , 2n-1-1].

4º – If the number is negative, the result must be negated:

5º • Invert all the bits individually and add 1 or

• Copy all the bits starting from the least significant until the first 1 is copied, then invert
all the remaining bits.

Changing the Number of Bits

• We can convert an n-bit two's-complement number into an m-bit one.

• If m > n, perform sign extension: – append m - n copies of the sign bit to the left

• If m < n, discard n – m leftmost bits; however, the result

is valid only if all of the discarded bits are the same as the sign bit of the result.

Exemplo:

n bits  m bits

m≥n n=4m=8 m<n n=4 m=3

0 0 1 1 c2 = 0 0 0 0 0 0 1 1 0 0 1 1 c2 = 0 1 1 c2

1 0 0 1 c2 = 1 1 1 1 1 0 0 1 Se tiver bits iguais pode-se cortar

8 - 4 = 4 x o primeiro número

1001 c2 = impossível, pois não tem dois bits

Iguais seguidos
Addition of Binary Numbers

Subtraction of Binary Numbers

Addition of Octal and Hexadecimal Numbers

NOTA:

Sempre que a soma ultrapassar o numero de bits no resultado final mete-se a diferença
entre o resultado da conta e o numero de bits.

Exemplo: 6 + 4 = 10 logo como 10 > 8 , 10 – 8 = 2 e acrescenta-se 1


N = 8 bits N = 16 bits NOTA:

103743 9AC52 Como estamos a trabalhar em 16 bits A + 5

+ 104247 + 1B3A2 = 15 = F em sistema hexadecimal só se a

210212 B5FF4 conta exceder 16 é que se adiciona 1

Subtraction of Octal and Hexadecimal Numbers

NOTA:

Ex 1: 1-2 = -1 , 8-1 = 7

E transporta 1 para a próxima coluna

Ex 2: 0-7 = -7 , 8-7 = 1

E transporta 1 para a próxima coluna

NOTA:

If an addition operation produces a result that exceeds the range of the number

system, overflow is said to occur.

• Addition of two numbers with different signs can never produce overflow.

• Addition of two numbers of like


sign can produce overflow if
Codes

Binary-Coded
Decimal (BCD)

Gray Code
Logic Gates
Axioms

Single-Variable Theorems

Two- and Three-Variable Theorems


Generalized DeMorgan's Theorem

NAND and NOR Gates


Boolean Functions

• There are 2m*2^n different boolean functions that can be implemented in a digital system
with n inputs and m outputs.

Truth Table

• The truth table for an n-variable logic function has 2n rows


(XOR)

X Y (X*Y) (X+Y) ~( X . Y ) ~(X + Y) X+Y ~X+Y IDENTIDADE


0 0 0 0 1 1 0 1 1
0 1 0 1 1 0 1 0 1
1 0 0 1 1 0 1 0 1
1 1 1 1 0 0 0 1 1

Termos mínimos e máximos

Minimos: negativo sempre que for 0

Maximos: negativo sempre que for 1

Expansão de Shannon
Mapas de Karnaugh
Método de Karnaugh (3 variaveis)

Método de Karnaugh (4 variaveis)


Método de Karnaugh (5 variaveis)

Método de Karnaugh (resumo)

1. Preencher o mapa de Karnaugh.

2. Encontrar todos os implicantes primos.

NOTA: Num mapa de Karnaugh, o implicante primo é um conjunto de 2n células


adjacentes que contêm valores ‘1’

3. Marcar no mapa todas as células distintas – células que só são cobertas

por um único implicante primo.

4. Encontrar todos os implicantes primos essenciais – implicantes primos que

cobrem uma ou mais células distintas.

Você também pode gostar