User:Kublai/Kublai'snotes

From Wikipedia, the free encyclopedia

Computer Studies[edit]

Assembly language[edit]

Common skill[edit]

  1. arithmematic shift left, right = muplite 2, div 2
    • muplite 8 = shift left, shift left, shift left
    • muplite 10 = shift left, shift left, shift left, add, add
  2. logical shift, routate(cyclic shift), rotate with carry..
  3. AND, OR, NOT (for testing) + conditational JUMP instruction
  4. Overflow proglem
  5. ADC/ADC and SUB/SBB to perform double width registers(carray will be used)
  6. MOV, ADD, SUB,
  7. MUL, DIV (annoying, digits of value will be changed, alway work with implicit operands, haven't been seen in ALCS PAST paper)
  8. hexadecimal arithmetics

Past paper[edit]

  1. 1995 Paper I Q14 (easy) (80x86)
LEA, indexing instruction
  1. 1996 Paper I Q 14 (general version, lots of addressing mode)

CPU[edit]

  • CPU structure

PC, IR, ACC, MAR, MDR, PSW, SR, XR, etc.

  • fetch-decode-execute cycle
  • data bus, address bus, control bus
  • Memory Unit
  • Machine languages

Machine instruction decoding/encoding

  • addressing modes
    1. direct addressing
    2. indirect addressing
    3. immediate
    4. index addressing (offset)
    5. relative addressing
  • Past paper
1995 Paper 1 Q14 (80x86 syntax) 
1996 Paper 1 Q14 (general syntax) 
1997 paper 1 Q14 (general syntax) 
1998 Paper 1 Q14 (general syntax) 
1999 Paper 1 Q12 (general syntax) 
2000 Paper 1 Q11 (*) link with 6.1-6.4 
2001 Paper 1 Q13 (general syntax) 
2002 Paper 1 Q13 (*) link with 6.1-6.4 
2003 Paper 1 Q14 (general syntax) 
2004 Paper 1 Q12 (general syntax) 
strongly recommend 2000 and 2002 for final check up point.
  • Single common bus (only one register can send/receive data)
  • MUX

Multiplexer

  • two types of instructions
    1. jump, branch (edit the content of PC, from IR to PC)
    2. add, sub, muptile, div

cool stuff[edit]

  1. The assembly process : assembler
  2. use of symbol table
  3. use of library routines
  4. directives(non excutable statements)
    • examples : var, label, macro, begin, end
  5. two passes ammemblers
  6. linker and loader

Flip-flop[edit]

The fundamental Flip-flop[edit]

  • RS cross-coupled NOR gates Flip-flop

Basic concept[edit]

  • gate
    1. NOR
    2. NAND
  • trigger (set)
postive trigger
send postive signal to set
negative trigger
send negative signal to set
  • enable (clock)
postive enable
send postive signal to enable the clock
negative enable
send negative signal to enable the clock
  • not allow

Steps to slove Flip-flop problems[edit]

  • find the fundamental step
  • draw truth table
  • e.g.
S R Qt-1 Qt
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 *
1 1 1 *

examples[edit]

2003 section A 4

  1. find Q and bar(Q)
  2. find trigger type (negative or positive)
  3. find enable mode (negative or positive)
  4. determine the type of the flip-flop

K-MAP[edit]

encirclings can only encompass 2^n fields, where n is an integer ? 0 (1, 2, 3, 4...).

PASCAL[edit]

review terms[edit]

  • pos(' ',str); {pay attention on the target and source}
  • val();
  • str();
  • copy(str,1,length(str)+999);
    • the copy length can bigger then the actual length of str

find max[edit]

  • set first be the max then check whether other bigger than it
max := 1;{max is a index not a value}
for i := 2 to total do
  if data[i] > data[max] then max := i;

bubble sort[edit]

for i := 1 to max-1 do
  for j := 1 to max-1 do
    if data[j] > data[j+1] then
      swap(data[j],data[j+1]);

Physics[edit]

Optical Instruments[edit]

properties of light[edit]

  • reversible(stright line ray in, foucs out ====> focus in, stright line ray out)
    • if a object can be formed a image with a convex lens, there are another distance for forming another image.(e.g. MC1992 # 16, notes p3/3)

point light source[edit]

  1. calculate the image position with the equation
  2. all light from the source to the mirror must then shine through the image

name of mirror / lens[edit]

  1. converging lens = convex lens
  2. diverging lens = concave lens
  1. converging mirror = concave mirror
  2. diverging mirror = convex mirror

how to draw a ray graph[edit]

  • consider whether it will be converged or diverged
  • real image ===> invert
  • virtual image ===> upright
  • the bigger height of image is , the longer distance from the lens
  • parallel lines ====> focus plane
  • stright line =====> focus point


  1. light rays passing through the optical centre of a lens do not bend.
  2. when light rays pass through the focus of a convex lens, the refracted light ray is parallel to the principle axis.