informatica scienze motorie
TRANSCRIPT
![Page 2: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/2.jpg)
Struttura del corso
• Sistemi di elaborazione delle informazioni
• Rappresentazione delle informazioni
• Algebra booleana
• Algoritmi e programmazione
• Strutturazione ed elaborazione dell’informazione a livello applicativo
• Reti di calcolatori e Internet
• ...
![Page 3: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/3.jpg)
Sistemi di elaborazione delle informazioni
Hardware
Dati problema
Software
Risultati
![Page 4: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/4.jpg)
Sistemi di elaborazione delle informazioni
HardwareDati
problema
Software
Risultati
![Page 5: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/5.jpg)
Applicazioni • Acquisizione dati
• Analisi dati
• Presentazione dati
• Gestione basi di dati
• Supporto alle decisioni
• Simulazioni
• Istruzione
• ...
![Page 6: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/6.jpg)
• Scopo
• Tecnologia
![Page 7: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/7.jpg)
Calcolatori elettronici
• Scopo
• Tecnologia
![Page 8: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/8.jpg)
Calcolatori analogici
![Page 9: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/9.jpg)
Calcolatori analogici
• Meccanici
![Page 10: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/10.jpg)
Calcolatori analogici
• Meccanici
• Idraulici
![Page 11: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/11.jpg)
Calcolatori analogici
• Meccanici
• Idraulici
• Elettrici
![Page 12: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/12.jpg)
Calcolatori analogici
• Meccanici
• Idraulici
• Elettrici
• Elettronici
![Page 13: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/13.jpg)
Calcolatori analogici
• Meccanici
• Idraulici
• Elettrici
• Elettronici
Grandezze continue
![Page 14: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/14.jpg)
Calcolatori digitali
ENIAC (1946)
![Page 15: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/15.jpg)
Calcolatori digitali
ENIAC (1946)Grandezze discrete
![Page 16: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/16.jpg)
Calcolatori digitali
• Dispositivi elettromeccanici
ENIAC (1946)Grandezze discrete
![Page 17: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/17.jpg)
Calcolatori digitali
• Dispositivi elettromeccanici
• Valvole termoioniche
ENIAC (1946)Grandezze discrete
![Page 18: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/18.jpg)
Calcolatori digitali
• Dispositivi elettromeccanici
• Valvole termoioniche
• Transistor
ENIAC (1946)Grandezze discrete
![Page 19: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/19.jpg)
Calcolatori digitali
• Dispositivi elettromeccanici
• Valvole termoioniche
• Transistor
• Circuiti integrati
ENIAC (1946)Grandezze discrete
![Page 20: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/20.jpg)
Programmabilità
• Telai programmabili (1800)
• Analytical Engine (Babbage, 1837)
• Zuse Z3 (1941)
• ENIAC (1946)
![Page 21: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/21.jpg)
Programmabilità
Scheda perforata
![Page 22: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/22.jpg)
Integrazione
Microprocessore 8 bit (MOS 6502 1975)
![Page 23: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/23.jpg)
Integrazione
Microprocessore 16 bit (Intel 8086, 1978)
![Page 24: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/24.jpg)
Integrazione
Microprocessore 32 bit (MC68000 1979)
![Page 25: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/25.jpg)
Integrazione
Microprocessore Dual Core (Core 2 Duo, 2005)
![Page 26: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/26.jpg)
Calcolatore personale (1977)
![Page 27: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/27.jpg)
Calcolatore personale (1981)
![Page 28: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/28.jpg)
Calcolatore personale (1985)
![Page 29: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/29.jpg)
Calcolatore portatile (2000)
![Page 30: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/30.jpg)
Netbook (2009)
![Page 31: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/31.jpg)
Tablet (2010)
![Page 32: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/32.jpg)
Embedded computer
![Page 33: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/33.jpg)
Embedded computer
![Page 34: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/34.jpg)
Smartphone
![Page 35: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/35.jpg)
Componenti di un PC
![Page 36: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/36.jpg)
Architettura Von Neumann
![Page 37: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/37.jpg)
Architettura Von Neumann
![Page 38: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/38.jpg)
Architettura di un calcolatore personale
![Page 39: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/39.jpg)
Componenti di un calcolatore personale
Scheda madre
![Page 40: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/40.jpg)
Componenti di un calcolatore personale
CPU
![Page 41: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/41.jpg)
Componenti di un calcolatore personale
RAM
![Page 42: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/42.jpg)
Componenti di un calcolatore personale
Hard disk drive
![Page 43: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/43.jpg)
Componenti di un calcolatore personale
Scheda di espansione
![Page 44: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/44.jpg)
Componenti di un calcolatore personale
Schede madriSubnotebook e desktop
![Page 45: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/45.jpg)
Componenti di un calcolatore personale
Processore AMD E Series E-450 (1.65GHz, 1MB L2)HD 500GB - RAM 4GB - Display 11,6" wideWi-Fi 802.11b/g/n - Windows 7 Home PremiumWebcam 1.3Mpixel integrata - Bluetooth 3.0+HS
Intel Pentium B960 (2.20GHz, 2MB L2)HD 750GB - RAM 6GB - Display 15,6" wide Wi-Fi 802.11b/g/n - Windows 7 Home PremiumWebcam con microfono integrataScheda video AMD Radeon HD 7450M 1GB dedicata
![Page 46: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/46.jpg)
Componenti di un calcolatore personale
Periferiche
•Memorie di massa•Dispositivi di input
• Tastiera• Mouse• Microfono (input audio)• Dispositivi di misurazione
•Dispositivi di output•Schermo •Stampante•Attuatori
![Page 47: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/47.jpg)
Rappresentazione delle informazioni
![Page 48: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/48.jpg)
Rappresentazione delle informazioni
•Notazioni convenzionali per la rappresentazione di informazioni allo scopo di renderne possibile lo scambio tra esseri umani
•Rappresentazione dei dati di tipo numerico‣10 cifre decimali: 0,1,2,3,4,5,6,7,8,9
•Rappresentazione dei dati di tipo testuale‣26 caratteri dell’alfabeto maiuscolo, minuscolo, segni di interpunzione e
simboli speciali (£, $, %, &, @, #...)•Notazione segno/grandezza per i numeri relativi‣+47, -53
•Notazione decimale per i numeri reali‣n = i + f‣12,34 dove 12 è la parte intera i e 0,34 è la parte frazionaria f
![Page 49: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/49.jpg)
Rappresentazione delle informazioni
‣I sistemi digitali manipolano elementi discreti di informazione‣Questi elementi discreti vengono fatti
corrispondere a quantità fisiche dette segnali (corrente, tensione)‣Se ai segnali si fanno assumere solo
due valori verranno detti BINARI‣I due valori sono tipicamente
rappresentati da intervalli di valori di tensione chiamati HIGH (ALTO) e LOW (BASSO)‣Distinguiamo tra range dei valori di
ingresso (input) e di uscita (output)
![Page 50: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/50.jpg)
Sistemi di numerazione
Un sistema di numerazione è un insieme finito di regole e simboli (digit), che permettono di dare un significato numerico ad una sequenza di tali simboli
•Posizionale: il significato di un simbolo dipende dalla posizione (num. decimale)
•Non posizionale: il significato di un simbolo non dipende dalla posizione (num. romana)
![Page 51: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/51.jpg)
Sistemi di numerazioneIl NUMERO dei simboli adoperato in un sistema di numerazione è la BASE (B) o RADICE (r) del sistema.
Le basi più frequenti sono:•BASE 10: B (r) = 10•BASE 2: B (r) = 2•BASE 8: B (r) = 8•BASE 16: B (r) = 16
I simboli che si possono rappresentare in radice r vanno da 0 a r-1.•r = 10 0,1,2,3,4,5,6,7,8,9•r = 2 0,1•r = 8 0,1,2,3,4,5,6,7•r = 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
![Page 52: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/52.jpg)
Sistemi di numerazione
Il numero N in radice r lo possiamo scrivere come:
N = Ni+Nf =An-1 rn-1 + An-2 rn-2 + ... + A0 r0 + A-1 r-1 + A-2 r-2 + ... + A-m r-m
•An-1 è il most significant digit (msd, simbolo più significativo)•A-m è il least significant digit (lsd, simbolo meno significativo)
![Page 53: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/53.jpg)
Numerazione binaria
In qualunque sistema di numerazione posizionale la base è sempre espressa come
10 (uno - zero)
Decimale Binario
0 0
1 1
2 10
3 11
4 100
5 101
6 110
7 111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
![Page 54: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/54.jpg)
Bit, byte e multipliUn byte (B) è costituito da 8 bit
1 byte può rappresentare 28 = 256 valori distintiIl massimo numero rappresentabile con 1 byte è
28 – 1 = 256 – 1 = 255
Multipli del bit o del byte sono indicati con i prefissiK – kilo, 210 = 1.024M – mega, 220 = 1.048.576G – giga, 230 = 1.073.741.824 T – tera, 240 = 1.099.511.627.776
![Page 55: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/55.jpg)
Conversione da binario a decimale1 0 1 1
Posizione 3 2 1 0
Peso 8 4 2 1
1x8 + 0x4 + 1x2 + 1 x 1 = 11
10112= 1110
![Page 56: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/56.jpg)
Conversione da decimale a binario11 11 11-8=3 3 3-2=1
Posizione 3 2 1 0
Peso 8 4 2 1
1 0 1 1
1110 =10112
![Page 57: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/57.jpg)
Conversione da base 10 a base r
P. int. Resto Peso41 41/2 20 1/2 1 1
20/2 10 0 0 2
10/2 5 0 0 4
5/2 2 1/2 1 8
2/2 1 0 0 16
1/2 0 1/2 1 32
Metodo delle divisioni successive
![Page 58: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/58.jpg)
Conversione da base 10 a base r
Intero Peso0,6875 0,6875 x 2 1,375 1 1/2
0,375 x 2 0,75 0 1/4
0,75 x 2 1,5 1 1/8
0,5 x 2 1 1 1/16
0 0
Conversione di numeri frazionari
0,687510 = 0,10112
![Page 59: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/59.jpg)
Conversione da base 10 a base r
Intero Peso0,77 0,77 x 2 1,54 1 1/2
0,54 x 2 1,08 1 1/4
0,08 x 2 0,16 0 1/8
0,16 x 2 0,32 0 1/16
0,32 x 2 0,64 0 1/32
Conversione di numeri frazionari
0,7710 = 0,11000...2
![Page 60: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/60.jpg)
Operazioni aritmetiche
16 8 4 2 1
Addendo 0 1 1 0 0
Addendo 1 0 0 0 1
01100 2+10001 2
![Page 61: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/61.jpg)
Operazioni aritmetiche
16 8 4 2 1Riporti
Addendo 0 1 1 0 0
Addendo 1 0 0 0 1
Risultato
01100 2+10001 2
![Page 62: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/62.jpg)
Operazioni aritmetiche
16 8 4 2 1Riporti 0 0 0 0 0
Addendo 0 1 1 0 0
Addendo 1 0 0 0 1
Risultato 1 1 1 0 1
01100 2+10001 2
![Page 63: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/63.jpg)
Operazioni aritmetiche
32 16 8 4 2 1Riporti 1 0 1 1 0 0
Addendo 1 0 1 1 0
Addendo 1 0 1 1 1
Risultato 1 0 1 1 0 1
10110 2+10111 2
![Page 64: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/64.jpg)
Operazioni aritmetiche
16 8 4 2 1Prestiti 0 0 0 0 0
1 0 1 1 0
1 0 0 1 0
0 0 1 0 0
10110 2-10010 2
![Page 65: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/65.jpg)
Operazioni aritmetiche
16 8 4 2 1Prestiti 0 0 1 1 0
1 0 1 1 0
1 0 0 1 1
0 0 0 1 1
10110 2-10011 2
![Page 66: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/66.jpg)
Operazioni aritmetiche
16 8 4 2 1Prestiti
1 0 0 1 1
1 1 1 1 0
10011 2-11110 2
![Page 67: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/67.jpg)
Operazioni aritmetiche
16 8 4 2 1Prestiti 0 0 1 1 0
1 1 1 1 0
1 0 0 1 1
- 0 1 0 1 1
- (11110 2 -10011 2)
![Page 68: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/68.jpg)
Operazioni aritmetiche
32 16 8 4 2 11 0 1 1
1 0 1
1 0 1 1
0 0 0 0
1 0 1 1
1 1 0 1 1 1
1011 2 x 101 2
![Page 69: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/69.jpg)
Rappresentazione di numeri reali
Utilizzando insiemi finiti di bit i numeri reali possono essere rappresentati:
•in virgola fissa• m bit per le potenze da 0 a m-1 e p bit per
le potenze da -1 a -p •es. 6+2 bit: 101100.01
•in virgola mobile• n bit per la mantissa, p bit per
l’esponente• m x be
• 6+2 bit: 10110001
![Page 70: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/70.jpg)
Rappresentazione di numeri interi con segno
Utilizzando insiemi finiti di bit i numeri interi con segno possono essere rappresentati:
•in modulo e segno• 1 bit per il segno e m-1 bit per il modulo •es. : 10110000 = ?
•in complemento a 2 (alla base)• m bit tutti per le cifre•es.: 00110000 -> 11010000
![Page 71: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/71.jpg)
CodiciIn un sistema di numerazione in base r, con n cifre è possibile rappresentare:•rn numeri interi: 0 … rn – 1
•I numeri frazionari: 0.0 … (rn-1) / rn
•Un codice binario a n-bit è un gruppo di n bit, che può assumere fino a 2n combinazioni distinte di 1 e 0, in cui ciascuna combinazione rappresenta un elemento dell’insieme da codificare.
‣Un insieme di quattro elementi può essere codificato con un codice binario con n = 2 bit (00, 01, 10, 11)‣Un insieme di otto elementi richiederà un codice a 3 bit‣Un insieme di 16 elementi richiederà un codice a 4 bit
![Page 72: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/72.jpg)
Codifica ASCII
American Standard Code for Information Interchange
![Page 73: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/73.jpg)
Rappresentazioni grafiche
0 0 0 1 1 0 0 0
0 0 1 0 0 1 0 0
0 1 1 0 0 1 1 0
0 1 1 1 1 1 1 0
0 1 1 1 1 1 1 0
0 1 1 0 0 1 1 0
0 1 1 0 0 1 1 0
0 0 0 0 0 0 0 0
![Page 74: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/74.jpg)
Rappresentazioni grafiche
0 0 0 1 1 0 0 0
0 0 1 0 0 1 0 0
0 1 1 0 0 1 1 0
0 1 1 1 1 1 1 0
0 1 1 1 1 1 1 0
0 1 1 0 0 1 1 0
0 1 1 0 0 1 1 0
0 0 0 0 0 0 0 0
![Page 75: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/75.jpg)
Rappresentazioni grafiche
7 6 5 4 3 2 1 00 0 0 1 1 0 0 00 0 1 0 0 1 0 00 1 1 0 0 1 1 00 1 1 1 1 1 1 00 1 1 1 1 1 1 00 1 1 0 0 1 1 00 1 1 0 0 1 1 00 0 0 0 0 0 0 0
![Page 76: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/76.jpg)
Algebra di Boole
AND (•)AND (•)AND (•)X Y Z0 0 00 1 01 0 0
1 1 1
OR (+)OR (+)OR (+)X Y Z0 0 00 1 11 0 1
1 1 1
NOT (‘)NOT (‘)X Z0 11 0
![Page 77: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/77.jpg)
Tabelle di veritàX Y Z F0 0 00 0 10 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
F= X OR ( (NOT Y) AND Z)
![Page 78: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/78.jpg)
Tabelle di veritàX Y Z F0 0 0 00 0 1 10 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
F= X OR ( (NOT Y) AND Z)
![Page 79: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/79.jpg)
Alcune identità fondamentali
X + 0 = X X • 1 = X
X + 1 = 1 X • 0 = 0
X + X = X X • X = X
X + ‘X = 1 X • ‘ X = 0
‘‘X = X
X + Y = Y + X X • Y = Y • X
X + (Y + Z) = (X + Y) + Z X • (Y • Z) = (X • Y) • Z
X • (Y+Z) = X•Y + X•Z X+Y•Z = (X+Y) • (X+Z)
![Page 80: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/80.jpg)
Programmabilità7 6 5 4 3 2 1 0
0
1
2
3
4
5
6
7
8
9
0 0 0 0 1 0 1 0
0 0 0 0 1 0 0 1
0 0 0 0 1 0 0 0
0 0 0 0 0 1 1 1
0 0 0 0 0 1 1 0
0 0 0 0 0 1 0 1
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 1
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
7 6 5 4 3 2 1 0
R1
R2
R3
R4
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1.Carica 0 in R12.Carica 10 in R23.Carica 0 in R44.Carica in R3 il valore della locazione
individuata da R15.Somma R3 a R4 (aggiornando il valore di
R4 con il risultato)6.Incrementa R17.Decrementa R28. Se R2 è maggiore di 0 salta all’istruzione 49. Fine
![Page 81: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/81.jpg)
Hardware e software
Hardware
Dati problema
Software
Risultati
![Page 82: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/82.jpg)
Hardware e software
Hardware
Dati problema
Software applicativo
Risultati
Strato software di astrazione hardware
![Page 83: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/83.jpg)
Sistema operativo
Hardware
Software applicativo
Sistema operativo
Gestione risorse•CPU•Memoria•I/O•Networking •Interfacce grafiche•...
![Page 84: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/84.jpg)
Software
Fasi di sviluppo•Scrittura•Esecuzione
Classificazione secondo il modello di esecuzione•Compilato•Interpretato
![Page 85: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/85.jpg)
Software compilato
Eseguibile
Sorgente
Compilazione
Esecuzione
Risultato
![Page 86: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/86.jpg)
Software interpretato
Interprete
Sorgente
Esecuzione
Risultato
![Page 87: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/87.jpg)
Distribuzione del software
Licenze software•Commerciali•“Libere”•Free software•Open source
![Page 88: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/88.jpg)
Software applicativo
Specializzato
“General purpose”
![Page 89: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/89.jpg)
Fogli di calcolo o “spreadsheet”
Origini•Sistemi batch
Commerciali•VisiCalc•Lotus 1-2-3
•Open source•Gnumeric•OpenOffice (e LibreOffice) Calc
A B C D
1
2
3
4
5
6
7
8
1 3 4
10 23 39
2 18 12
45 74 76
30 12 9
-1 1 43
15 0 -1
Tot 102 131 182
![Page 90: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/90.jpg)
Fogli di calcolo o “spreadsheet”
•Griglia di celle indicizzate per riga e colonna
•Ogni cella può contenere valori costanti o formule
•Le formule consentono di effettuare i “calcoli”
A B C D
1
2
3
4
5
6
7
8
1 3 4
10 23 39
2 18 12
45 74 76
30 12 9
-1 1 43
15 0 -1
Tot 102 131 182
![Page 91: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/91.jpg)
Fogli di calcolo o “spreadsheet”
•Riferimenti a singola cella:• B3 colonna B riga 3•$B3 colonna B assoluta riga 3•B$3 colonna B riga assoluta 3•$B$3 colonna assoluta B riga
assoluta 3
A B C D
1
2
3
4
5
6
7
8
1 3 4
10 23 39
2 18 12
45 74 76
30 12 9
-1 1 43
15 0 -1
Tot 102 131 182
![Page 92: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/92.jpg)
Fogli di calcolo o “spreadsheet”
Insiemi di celle possono essere individuati mediante riferimenti rettangolari.
A B C D
1
2
3
4
5
6
7
8
1 3 4
10 23 39
2 18 12
45 74 76
30 12 9
-1 1 43
15 0 -1
Tot 102 131 182
(cella in alto a sinistra : cella in basso a destra)B3:C5
![Page 93: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/93.jpg)
Fogli di calcolo o “spreadsheet”
Una formula definisce un processo di calcolo che dà valore a una cella. L’ inserimento comincia con i l c a r a t t e r e “ = ” s e g u i t o d a un’espressione costruita con costanti, operatori, parentesi e funzioni.
A B C D
1
2
3
4
5
6
7
8
9
1 3 4
10 23 39
2 18 12
45 74 76
30 12 9
-1 1 43
15 0 -1
Tot 102 131 182
Med 14,6 18,7 26
![Page 94: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/94.jpg)
Fogli di calcolo o “spreadsheet”
Costanti: numeriche, stringhe (“abc”)Operatori: + - / *F u n z i o n i : s o m m a ( ) , m e d i a ( ) , pendenza(), intercetta(), se(), vero(), falso(), e(), o(), non(), conta.se(), somma.se()
A B C D
1
2
3
4
5
6
7
8
9
1 3 4
10 23 39
2 18 12
45 74 76
30 12 9
-1 1 43
15 0 -1
Tot 102 131 182
Med 14,6 18,7 26
![Page 95: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/95.jpg)
Fogli di calcolo o “spreadsheet”
B8=somma(B$1:B$7)B9=media(B$1:B$7)
Il valore di una formula viene ricalcolato automaticamente al variare dei valori individuati dai riferimenti presenti nell’espressione.
A B C D
1
2
3
4
5
6
7
8
9
1 3 4
10 23 39
2 18 12
45 74 76
30 12 9
-1 1 43
15 0 -1
Tot 102 131 182
Med 14,6 18,7 26
![Page 96: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/96.jpg)
Base di datiInsieme organizzato di dati a supporto dello svolgimento
di attività.
Possono avere struttura:• Gerarchica• Reticolare• Relazionale• ...
![Page 97: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/97.jpg)
Sistema di gestione di basi di dati (DBMS)
Sistema che gestisce collezioni di dati:• Grandi• Persistenti• Condivise
Garantendo• Privatezza (gestione accessi)• Affidabilità (transazioni)• Efficienza (utilizzo delle risorse di calcolo e di
memoria)• Efficacia
![Page 98: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/98.jpg)
Sistema di gestione di basi di dati (DBMS)
In una base di dati esistono:• Lo schema, invariante nel tempo, che ne descrive la
struttura • L’istanza, variabile nel tempo, determinata dai valori
attuali
![Page 99: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/99.jpg)
Sistema di gestione di basi di dati (DBMS)
Schemi•schema logico: descrizione dell’intera base di dati nel modello logico del DBMS (es. struttura delle tabelle)•schema interno (o fisico): rappresentazione dello schema logico per mezzo di strutture fisiche di memorizzazione•schema esterno: descrizione di parte della base di dati in un modello logico (“viste”)
![Page 100: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/100.jpg)
BD
Schema logico
Schema esterno
Schema interno
Schema esterno
Schema esterno
utente utente utente utente utente
Sistema di gestione di basi di dati (DBMS)
![Page 101: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/101.jpg)
Modello relazionale
D1, D2, ... Dn insiemi, anche non distinti (domini)
Prodotto cartesiano D1 x D2 x ... x Dn insieme di tutte le n-uple d1, d2, ..., dn con d1 ∈ D1, d2 ∈ D2, ..., dn ∈ Dn
Una relazione è un sottoinsieme del prodotto cartesianor ⊆ D1 x D2 x ... x Dn
![Page 102: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/102.jpg)
Modello relazionaleUna tabella rappresenta una relazione se•i valori di ogni colonna sono fra loro omogenei •le righe sono diverse fra loro•le intestazioni delle colonne sono diverse tra loro In una tabella che rappresenta una relazione•l’ordinamento tra le righe è irrilevante•l’ordinamento tra le colonne è irrilevante
![Page 103: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/103.jpg)
Modello relazionaleStudenteStudenteStudenteStudente
Matricola Cognome Nome Data di nascita
1234 Rossi Mario 1/1/1990
5678 Bianchi Giuseppe 2/2/1990
9012 Verdi Carla 3/3/1991
3456 Bianchi Mario 1/1/1990
EsameEsameEsame
Studente Voto Corso
1234 30 1114
1234 30 1113
9012 28 1111
5678 30 1111
CorsoCorso
Codice Nome
1114 Informatica
1112 Anatomia
1113 Diritto
1111 Economia
![Page 104: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/104.jpg)
Modello relazionaleI vincoli di integrità specificano proprietà che devono essere soddisfatte dalle istanze per rappresentare informazioni corrette per l’applicazione.
Possono essere:•intrarelazionali
•su valori (dominio)•di ennupla
•interrelazionali
![Page 105: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/105.jpg)
Modello relazionaleStudenteStudenteStudenteStudente
Matricola Cognome Nome Data di nascita
1234 Rossi Mario 1/1/1990
5678 Bianchi Giuseppe 2/2/1990
9012 Verdi Carla 3/3/1991
9012 Bianchi Mario 1/1/1990
EsameEsameEsameEsame
Studente Voto Lode Corso
1234 30 VERO 1114
1234 32 FALSO 1113
9012 28 VERO 1111
5679 30 FALSO 1111
CorsoCorso
Codice Nome
1114 Informatica
1112 Anatomia
1113 Diritto
1111 Economia
![Page 106: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/106.jpg)
Modello relazionale
Una chiave è un insieme di attributi che identifica le ennuple di una relazione.
Esempio:•Matricola•Cognome, Nome, Data di nascita
StudenteStudenteStudenteStudente
Matricola Cognome Nome Data di nascita
1234 Rossi Mario 1/1/1990
5678 Bianchi Giuseppe 2/2/1990
9012 Verdi Carla 3/3/1991
3456 Bianchi Mario 1/1/1990
![Page 107: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/107.jpg)
Modello relazionale
Una chiave si dice primaria se non ammette valori nulli.
Formalismo:Studente(Matricola, Cognome, Nome, Data di nascita)Studente(Matricola, Cognome, Nome, Data di nascita)
StudenteStudenteStudenteStudente
Matricola Cognome Nome Data di nascita
1234 Rossi Mario 1/1/1990
5678 Bianchi Giuseppe 2/2/1990
9012 Verdi Carla 3/3/1991
3456 Bianchi Mario 1/1/1990
![Page 108: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/108.jpg)
Modello relazionaleStudenteStudenteStudenteStudente
Matricola Cognome Nome Data di nascita
1234 Rossi Mario 1/1/1990
5678 Bianchi Giuseppe 2/2/1990
9012 Verdi Carla 3/3/1991
3456 Bianchi Mario 1/1/1990
EsameEsameEsame
Studente Voto Corso
1234 30 1114
1234 30 1113
9012 28 1111
5678 30 1111
CorsoCorso
Codice Nome
1114 Informatica
1112 Anatomia
1113 Diritto
1111 Economia
Un vincolo di integrità referenziale, chiave esterna (“foreign key”) impone ai valori di una relazione di comparire come valori di chiave primaria di un’altra.
![Page 109: Informatica Scienze Motorie](https://reader037.vdocuments.mx/reader037/viewer/2022102503/5449fb65b1af9f186b8b45ff/html5/thumbnails/109.jpg)
Testi•Ceri, Mandrioli, Sbattella, “Informatica arte e mestiere”, McGraw-Hill
•Schneider, Gersting, “Informatica”, Apogeo