extras Flashcards
What is the purpose of a D type flip flop?
Stores the value of one bit when a clock signal is given.
How does it work?
There is a clock input and data input. Every time the clock input is high, the output is set to the data input.
Where are d type flip flops used?
Synchronised data transfer within circuits by making sure the output only changes at times determined by the clock signal.
What is the purpose of an adder circuit?
Add two binary numbers together.
What is the difference between a half and full adder?
A half adder takes in 2 bits and returns the sum and carry.
A full adder takes in 3 bits (2 and a carry) and returns a sum and carry.
What happens when data is sent on data bus to read or write?
control bus sends read/write signal before data is transmitted
How do you write an attribute in oop pseudocode?
private attributename
How do you write a constructor method in oop pseudocode?
public procedure new(parameters)
example
endprocedure
How do you write any other method in oop pseudocode?
public procedure functionname()…
What if the method returns a value?
public function name()…
How do you create a new object?
objectname = new classname(arguments)
How do you create a child class?
class childname inherits parentname
How do you call a parent class method in a child class?
super.methodname()
or super.new()
What does string[:n] do?
gives all the characters before n not including n’s position
What does string[n:] do?
gives all the characters after and including n’s position