Skip to content

Instantly share code, notes, and snippets.

@liang799
Last active January 10, 2022 16:15
Show Gist options
  • Save liang799/358652bb495e8ce5c88888484fc11342 to your computer and use it in GitHub Desktop.
Save liang799/358652bb495e8ce5c88888484fc11342 to your computer and use it in GitHub Desktop.
SP Computer Interfacing Tutorial Solutions

Section A

MCQ

d (correct)
c (correct)
a (wrong Ans:b)
d (wrong Ans:c)
c (correct)
d (correct)
? (Ans: D)
d (wrong Ans:a)
c (wrong Ans:d)
a (correct)
c (correct)
b (wrong Ans: a)

Section B

MY ans

  1. To ensure signal compatability between that of the computer and those of the external devices
  2. ADC converts analog signals to digital signals. This is useful as it allows us to interact with the outside world.
  3. USB ports, headphone jack, hdmi ports.

Correct ans

  1. Whatever the application the computer is used in, information from the outside world need to be passed to the computer for processing and the result of the processing passed back to the outside world.
  2. serial ports, parallel port

Section A

MCQ

  • c (ans: D multitasking means do very fast)
  • ? (ans: b - need speed SRAM : flip flops DRAM : capacitors, need to charge and discharge, slower.)
  • a
  • b (the reason is 20 address. 2^20 = 1M)
  • d
  • c (mutlitasking have tendency to overlap, so protected mode prevnts that)
  • b (ans: c ===> polling - asking all the time, interrup is most efficient)
  • c
  • b (ans: d ===> read the notes)
  • d (Basic I/O system ===> bios)

Section B

My answers

  1. The 8086 processor has a memory map of 1 Mbytes in size because it has 20 address bits

I think so, by adding more registers

  1. (a) In real mode, the processor hardware does not check all memory accesses. Application programs share resources with the OS. (b) When the PC was first switched on, the CPU started off in the 8086 Real Mode executing the routines in the Boot ROM, after that, the operating system would take over the control of the PC before any application software is started. Since the OS has the initial control, it sets its kernel (core) to the highest privilege level (PL = 0) (c) So that application programs do not share resources with the OS.

Recommened Answers

  1. Can be done, but very complicated, need addtional hardware like ram
  2. cher was talking something about old processors
  3. It is impossible as segment discriptor cleary defines the boundaries... (It's best to read through and answer in your own words)

Section A

  1. a (Ans: c, as DMA is a secondary bus master)
  2. c (c is not wrong ,but better Ans: b)
  3. d
  4. b (Ans: A, usually later stuff can be run by earlier one)
  5. a
  6. use calculator (Ans: b, remeber to offset)
  7. b
  8. d (Ans: b, shouldn't have anything to do with applicaton programs)
  9. d (Ans: c, Only asking what CPU do && "CPU would release the system bus to the ....")
  10. a

Section B

My answers

  1. Question 1
    • A DLL is a device driver containing codes that a Windows application program can call on.
    • To do this, the application program must have declaration statements indicating the DLL needed, so that it will be loaded in with the application
  2. Question 2
    • there is a constant need to interact with the cpu
    • dma allows memory to be accessed without the cpu

Stuff heard from cher

Section A

My ans

  1. d (Ans: b - can be either buffer or latch, but a buffer is prefered as it is cheaper)
  2. c
  3. d

cher ans

  1. a (must wait until read or control signal)
  2. d (need to know where come from, direction, size)
  3. d
  4. c
  5. d - if u send out data very fast, the data would not keep up with the change. The latch will slow it down as it has a clock. Buffer don't have clock.
  6. a
  7. d - refer of page 18 of chapter 2
  8. c (only mode 1 & 2 have handshaking)
  9. c

Section B

hmk

  1. In handshaking, indicating signals are use in the data exchange sequence. Because those I/O devices are using asynchronous data transfer. An acknowledgment is needed so that they know whether the data has been received.
    • 1 00 1 1 0 0 1
    • 1 00 1 0 0 1 0
    • 1 01 0 x 1 0 x
  1. This thing is active low. 0v V =IR V =5, R = 10k I =

  2. Just focus on the 2 resistor All using ohm's law and voltage divider If = Current forward

  3. hfe = gain of transistor

Section A

  1. b (in lab, we set all bit to zero as we are not using the rest)
  2. c ( Ans: b)
  3. b
  4. c ( Ans: b, in lab we got connect to other to other devices, so not exclusive to printer, parallel cannot be used as serial, it is not always fixed at 8 bit)
  5. d ( the inout32 one, which answer refers to that. Nothing to do with interrupt. device driver - function.) Ans: b

Section B

  1. The 8-bit data is first latched into the ‘LS374 with the triggering clock being generated by software via C2 of the Control port. Since the output enable pin of the ‘LS374 is permanently enabled, the 8-bit data is readily available at the outputs of the ‘LS374. The data is then input via the Status port (S4~S7) one nibble at a time by controlling the _1G and the _2G inputs of the ‘LS244 Tri-state® buffer.

Section A

Answers

  1. b (only need one but must also have reference line)
  2. c
  3. a (read notes man)
  4. a (8-N-1 8 data bit - No parity bit - 1 stop bit) must also include start bit
  5. b (read notes, note that it is different from ttl)
  6. c (read from right to left then convert to hex)
  7. b
  8. a (find total bits, then data/total * 100)
  9. d (a is impossible; some technqiue which wasn't covered; some te..; ill try to adjust itself so no drift so far)
  10. c (read notes if don't understand)

section B

Answers

  1. Answer is in mcq q3
  2. refer to notes - serial transmission formates
  3. try it urself lol
  4. refer to line control register diagram
  5. a) Remember just now i tell u the voltage level and logic level different. refer to mcq A5. There is a diff in voltage level. There must be an interpreter in between to leverage the .... so that they can understand each other. b) Read notes bruh c)

Section A

  1. 1
  2. .
  3. a

Answers

  1. c (page 17 of chapter 5)
  2. d (telephone no null modem, modulation ---> carrier signal (notes: pg10))
  3. a (refer to notes)
  4. b
  5. d (first 3 got to do with error)
  6. c (must be quite long ===> 3 second break means nothing transmitted, it's a pause)
  7. a (refer to notes pg 9-10: transmit, receive. The rest also control signal but not...)
  8. b (when you first dial the phone, the guy pick up, same thing here, it is for data)
  9. d (has got nothing to do with modem here, must do with signal. When you want to pick up for a call for... this again is another control signa) ===> pg9-10
  10. c (also something we did in the lab on Monday, there is only 1 register) ===> refer to notes on UART (Line control register)

Section B

Section A

  1. a
  2. a (notes did mention)
  3. b (five tier) => on the same page 5
  4. d
  5. c (in the notes ==> pg8) --> suprising? because of propagtion delay
  6. d (in the notes -==> 4 types)
  7. b (when send in is serial, nothing to do with parallel, the one uses lsb first)
  8. c (there's no such thing as power consumption packet)

Section A

  1. d
  2. a
  3. d
  4. b
  5. c
  6. b (ans: c)
  7. b
  8. a (ans: infite, depens on your sample value)
  9. d
  10. c

Section B

  1. Input:Temp sensor Transducer ADC Output: Motor
  2. Capactior value cannot be too big, low resistance, no leakage

Section A

  1. a
  2. d
  3. c
  4. b (before u send a maximum, it is already maximum)
  5. b
  6. d
  7. b
  8. c
  9. d
  10. d (2^12)

Section B

Section A

  1. ? (refer to SRQ)
  2. ?
  3. a
  4. d (wifi is the best. zigbee is like bluetooth but not as widecoverage. Infrared is remote control)
  5. a (then what is the point)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment