Für Vorlesungen, bitte die Webseite verwenden. https://flavigny.de/lecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
578B

  1. class Adder4Bit : public Circuit {
  2. public:
  3. Adder4Bit ();
  4. // Konstruktor
  5. ~Adder4Bit ();
  6. // destruktor
  7. virtual void ChangeInput (State s, int pin);
  8. // Eingang wechselt zur aktuellen Zeit den Zustand
  9. virtual void Action ();
  10. // berechne Gatter neu und benachrichtige Draht
  11. // am Ausgang
  12. virtual void ConnectInput (Wire& w, int pin);
  13. // verdrahte Eingang
  14. virtual void ConnectOutput (Wire& w, int pin);
  15. // verdrahte Ausgang
  16. private:
  17. Wire w0,w1,w2; // lokale Draehte
  18. FullAdder fa0,fa1,fa2,fa3; // Volladdierer
  19. } ;