Study Web

Week 2

Clocks (and introducing the ALU)

COS10004 Computer Systems · Lecture 2.2 – Clocks (and introducing the ALU)

GATES ARE NOT INSTANTANEOUS

Changing the state of a gate takes some finite time.

X

Y S

Ci

What’s the issue here?

GATES ARE NOT INSTANTANEOUS

Changing the state of a gate takes some finite time.

Ci and the output of X XOR Y will arrive at different times!!!

X The circuit is unstable. Y S If only we could synchronise things!! Ci

What’s the issue here?

GATES ARE NOT INSTANTANEOUS

Changing the state of a gate takes some finite time.

Ci and the output of X XOR Y will arrive at different times!!!

X The circuit is unstable. Y S If only we could synchronise things!! Ci

What’s the issue here?

Clock

Could be something simple like a 555 timer (astable multivibrator using an RC timing element), a crystal oscillator, a phase-locked loop or an atomic clock. Probably just a chip.

Clock feeds into the ALU

clock

time

The clock is needed because bits need to “settle” before you can use them.

Computers often have different clocks controlling different parts.

7/8/20 6 COS10004 Computer Systems

Clock feeds into the ALU Result out carry

clock ALU Control bits

Often an ALU needs 2 clock bits out of phase:

clock1 clock2

Common symbol for ALU

7/8/20 7 COS10004 Computer Systems

Summary

  • Clocks ensure data flow is synchronised in a circuit:
  • Ensures predictability
  • Avoid illegal/ill-defined states
  • Arithmetic Logic Unit:
  • Where integer calculations and bit shifting operations are performed
  • We’ll come back to both these topics!
  • Next Lecture: Storing bits