Tietojenkäsittelytiede (Avoin yliopisto)
Tietokoneen toiminta (2 ov)
Kuulustelija: Liisa Marttinen

Luentokuulustelu 18.06.2005

  1. Tiedon esitys ja muuttumattomuus [12 p]
    1. Muuta desimaaliluku 145.625 binääriluvuksi ja heksadesimaaliluvuksi. (3 p)
    2. Anna desimaaliluvun145.625 IEEE:n 32 bitin liukulukustandardin mukainen esitys.(3 p)
    3. Esitä, miten 8-bittinen tieto 1010 0100 suojataan käyttäen
      • parillista pariteettia (1 p)
      • Hamming-koodia (2 p)
    4. 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

  2. Konekäskyjen suoritus [13 p] Käytetään esimerkkinä tietokoneesta kurssilla esitettyä yksinkertaistettua TTK-91 - tietokonetta.
    1. Kuvaa prosessorin rekistereiden tasolla, miten tehdään käskynouto.(4 p)
    2. Esitä prosessorin rekisterien tasolla miten suoritetaan käskyt: (4 p)
                       DIV   R2,@(R1)
                       JUMP  pois 
      
    3. Mitä keskeytyksiä voi tapahtua käskyn suorituksen aikana? Miten keskeytykset havaitaan? Miten eri keskeytykset vaikuttavat suorittavaan käyttäjäohjelmaan? (5 p)

  3. Määrittele lyhyesti seuraavat käsitteet [12 p]
    1. prosessikuvaaja (3 p)
    2. symbolitaulu (3 p)
    3. linkittäjä (3 p)
    4. laiteajuri (3 p)

  4. Ohjelmointia symbolisella konekielellä [13 p]
    1. Määrittele kokonaislukuarvoinen taulukko Luvut [0:49]. (1 p)
    2. Lue taulukkoon näppäimistöltä 50 lukua. (3 p)
    3. 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)
    4. 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

  1. Data representation and error checking [12 p]
    1. What is decimal number 145.625 in binary and in hexadecimal? (3 p)
    2. What is the IEEE floating point standard representation of the decimal number 145.625? (3 p)
    3. Show how 8-bit data 1010 0100 is protected using
      • even parity (1 p)
      • Hamming code (2 p)
    4. 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

  2. Execution of machine instructions [13 p] Use as an example the simplified TTK-91 computer introduced in the course.
    1. Show in detail (at the level of CPU registers) how the next instruction is fetched (fetch cycle). (4 p)
    2. Describe at the level of CPU registers how the following instructions are executed: (4 p)
                       DIV   R2,@(R1)
                       JUMP  pois 
      
    3. What interrupts can happen during an instruction execution? How are interrupts detected? How do interrupts affect the running user program? (5 p)

  3. Explain shortly the following concepts [12 p]
    1. process control block PCB (3 p)
    2. symbol table (3 p)
    3. linker (3 p)
    4. device driver (3 p)

  4. Programming with a symbolic machine language[13 p]
    1. Define an integer table Numbers[0:49]. (1 p)
    2. Read from the keyboard 50 numbers into the table Numbers. (3 p)
    3. 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)
    4. 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)