Tietojenkäsittelytiede (Avoin yliopisto)
Tietokoneen toiminta (2 ov)
Kuulustelija: Liisa Marttinen
Luentokuulustelu 18.06.2005
- Tiedon esitys ja
muuttumattomuus [12 p]
- Muuta desimaaliluku
145.625 binääriluvuksi ja heksadesimaaliluvuksi. (3 p)
- Anna
desimaaliluvun145.625 IEEE:n 32 bitin liukulukustandardin mukainen
esitys.(3 p)
- Esitä, miten
8-bittinen tieto 1010 0100 suojataan käyttäen
- parillista pariteettia (1 p)
- Hamming-koodia (2 p)
- Oletetaan, että
bittivirhe muuttaa suojaamasi tiedon yhden bitin niin, että
tieto muuttuukin muotoon 1011 0100.
Näytä, kuinka tämä havaitaan ja korjataan, kun
suojaus on tehty käyttäen
- parillista
pariteettia (1 p)
- Hamming-koodia (2 p
- Konekäskyjen
suoritus [13 p]
Käytetään
esimerkkinä tietokoneesta kurssilla esitettyä
yksinkertaistettua TTK-91 - tietokonetta.
-
Kuvaa prosessorin
rekistereiden tasolla, miten tehdään käskynouto.(4 p)
- Esitä
prosessorin rekisterien tasolla miten suoritetaan käskyt: (4 p)
DIV R2,@(R1)
JUMP pois
- Mitä keskeytyksiä voi tapahtua käskyn suorituksen aikana?
Miten keskeytykset havaitaan? Miten eri keskeytykset vaikuttavat
suorittavaan käyttäjäohjelmaan? (5 p)
-
Määrittele lyhyesti seuraavat käsitteet [12 p]
- prosessikuvaaja
(3 p)
- symbolitaulu
(3 p)
- linkittäjä
(3 p)
- laiteajuri
(3 p)
-
Ohjelmointia symbolisella konekielellä [13 p]
-
Määrittele kokonaislukuarvoinen taulukko Luvut [0:49]. (1
p)
-
Lue taulukkoon näppäimistöltä 50 lukua. (3 p)
- Laadi funktio Pienin(Taulu, Koko), joka palauttaa arvonaan
taulukon Taulu[Koko] pienimmän alkion
arvon. Funktiota Pienin kutsutaan välittämällä
parametrit Taulu ja Koko pinossa.
Samoin funktio palauttaa löytämänsä pienimmän
arvon pinossa.
Voit olettaa, että
parametrin Koko arvo on positiivinen. (5 p)
- Laadi pääohjelma,
joka kutsuu funktiota Pienin etsimään taulukon Luvut [0:49]
pienimmän arvon ja tulostaa saadun arvon
näytölle. (4 p)
Computer Science (Open University)
Computer Organization I (2 cu)
Liisa Marttinen
Course Examination 18.06.2005
- Data representation and
error checking [12 p]
- What is decimal number
145.625 in binary and in hexadecimal? (3 p)
-
What is the IEEE floating point standard representation of the decimal number 145.625?
(3 p)
- Show how
8-bit data 1010 0100 is protected using
- even parity (1 p)
- Hamming code (2 p)
- Assume that a bit error changes the protected data into 1011 0100.
Show how this error is detected and corrected when the data was protected using
- even parity (1 p)
- Hamming code (2 p
- Execution of machine instructions [13 p]
Use as an example the simplified TTK-91 computer introduced in the course.
-
Show in detail (at the level of CPU registers) how the next instruction is fetched (fetch cycle). (4 p)
- Describe at the level of CPU registers how the following instructions are executed: (4 p)
DIV R2,@(R1)
JUMP pois
- What interrupts can happen during an instruction execution?
How are interrupts detected?
How do interrupts affect the running user program? (5 p)
-
Explain shortly the following concepts [12 p]
- process control block PCB
(3 p)
- symbol table
(3 p)
- linker
(3 p)
- device driver
(3 p)
-
Programming with a symbolic machine language[13 p]
-
Define an integer table Numbers[0:49]. (1 p)
-
Read from the keyboard 50 numbers into the table Numbers. (3 p)
- Write code for a function Min(Table, Tsize), that returns as its value
the smallest element from the Table[Tsize]. The parameters for the function (Table, Tsize) are passed in the stack.
Also the value of the smallest element is returned in the stack.
You can assume that the value of the parameter Tsize is positive.
(5 p)
- Write code for a main program that calls the function Min to find the smallest number from the table Numbers[0:49] and after that outputs the returned value on the screen. (4 p)