Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(gateType = 'AND', input = 'A'):
- (ab, delay) = {
- 'AND': ({'A': (a,b), 'B': (c,d)}, delay1),
- 'OR': ({'A': (x,y), 'B': (k,l)}, delay2),
- ('INV': {'A': (g,h)}, delay3)
- }[gateType]
- (a,b) = ab[input]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement