26.10.2013 Views

3 sommatore e porte logiche - Fisica

3 sommatore e porte logiche - Fisica

3 sommatore e porte logiche - Fisica

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Corso di Laurea in<br />

Statistica e Informatica per<br />

la gestione delle imprese<br />

Economia e Commercio<br />

Architettura degli<br />

elaboratori<br />

1


Non è degno di uomini eccellenti perdere<br />

ore come schiavi e faticare su calcoli che<br />

potrebbero essere affidati a chiunque se<br />

venissero usate le macchine.<br />

Gottfried Wilhelm Leibnitz<br />

2


E’ possibile costruire una macchina che faccia i calcoli al<br />

posto dell’uomo?<br />

Cominciamo dalla operazione più semplice: la somma<br />

PROBLEMA: Costruire un <strong>sommatore</strong><br />

3


Vediamo nel dettaglio la somma a 1 bit:<br />

B1 +<br />

_____ B2 =<br />

S<br />

0 +<br />

_____ 0 =<br />

0<br />

0 +<br />

_____ 1 =<br />

1<br />

1 +<br />

_____ 1 =<br />

10<br />

4


Operatori logici, cenni di logica booleana<br />

La somma non è la sola operazione che si può fare sui bit.<br />

Oltre alle operazioni algebriche esistono le operazioni LOGICHE<br />

Operazione LOGICA NOT Tavola di verità<br />

5


Operazione LOGICA OR Tavola di verità<br />

6


Operazione LOGICA AND<br />

Tavola di verità<br />

7


Algebra di Boole: ….. George Boole (1815 - 1864)<br />

NOT<br />

OR<br />

Vediamo qualche esempio….<br />

AND<br />

8


NOT<br />

OR<br />

AND<br />

Se I1 = 1 ------> NOT (I1) = 0 Se I1 = 0 ------> NOT (I1) = 1<br />

Se I1 = 0 e I2 = 1 ------> I1 AND I2 = 0<br />

Se I1 = 1 e I2 = 1 ------> I1 AND I2 = 1<br />

Se I1 = 0 e I2 = 1 ------> I1 OR I2 = 1<br />

9


NOT<br />

OR<br />

AND<br />

Se I1 = 0 e I2 = 1 ------> (I1 OR I2) AND I1 = ?<br />

Se I1 = 1 e I2 = 0 ------> (I1 AND I2) OR (I1 OR I2) = ?<br />

Se I1 = 1 e I2 = 1 ------> (I1 OR I2) AND (I1 OR I2) = ?<br />

10


NOT<br />

Reti combinatorie<br />

OR<br />

AND<br />

11


Algebra di Boole<br />

12


Problema: data una tavola di verità come determinare l’espressione<br />

algebrica che la soddisfa<br />

Ci sono diverse tecniche ….<br />

Data una tavola di verità:<br />

1. si considerano le righe delle uscite corrispondenti a valori 1<br />

2. per queste righe si fa l’AND tra gli elementi che costituiscono gli ingressi negando<br />

quelli che hanno 0 in ingresso<br />

3. si fa l’OR dei termini così ottenuti.<br />

Esempio: il semi-<strong>sommatore</strong><br />

13


Esercizio:<br />

Determinare la forma minima ….<br />

15


Esercitazione<br />

Algebra di Boole<br />

19


Esercitazione<br />

X = (AB)’ NAND<br />

20


Esercitazione<br />

X = (BC)’ A + BCA’ 7<br />

21


Esercitazione<br />

Nessuna delle precedenti<br />

22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!