A LANGUAGE FOR DIGITAL DESIGN
|
03-01-2019, 04:55 AM
Post: #1
|
|||
|
|||
A LANGUAGE FOR DIGITAL DESIGN
Quote:The point I want to emphasize is the ease with which a new arithmetic can-- Chuck Moore Based on A LANGUAGE FOR DIGITAL DESIGN I wrote these programs for the HP-48GX. A signal has bit 15 on (+5V) or off (GND) . Bits 14-0 hold the time it becomes known (ns or .1ns). # 32768d == # 8000h # 32767d == # 7FFFh Digital logic simulator S. types the value and time of a signal (+ indicating +5V). Code: « DUP # 32767d AND ¬ complements a signal (without changing its time). Code: « # 32768d XOR » max returns the maximum of two binary numbers. Code: « and combines 2 signals with worst case timing. Code: « OVER # 23767d AND or combines 2 signals using DeMorgan's law. Code: « ¬ SWAP ¬ and ¬ » Technology AND2¬ is a 2-input nand gate with 9ns delay. Code: « and ¬ # 9d + » OR3 is a 3-input or gate with 30ns delay. Code: « or or # 30d + » XOR2 is a 2-input exclusive-or gate with 35ns delay. Code: « OVER ¬ OVER and Logic equations A is a signal known low at 0ns. Code: # 0d B is a signal known low at 10ms. Code: # 10d C is a signal known high at 10ms. Code: « # 10d ¬ » ENB¬ is a signal determined low by A and B at 45ns. Code: « A B XOR2 » XY is a signal determined high by A, B and C at 84ns. Code: « ENB¬ C AND2¬ A B OR3 » Examples ENB¬ S. # 45d XY S. +: # 84d Kind regards Thomas |
|||
03-01-2019, 03:14 PM
(This post was last modified: 03-01-2019 03:46 PM by Thomas Klemm.)
Post: #2
|
|||
|
|||
HP-42S: A LANGUAGE FOR DIGITAL DESIGN
Here are the equivalent programs for the HP-42S.
A slightly different data-format is used though: s.tttttt s: signal on (1) or off (0) tttttt: time in ns Digital logic simulator Code: 00 { 55-Byte Prgm } Technology Code: 00 { 91-Byte Prgm } Logic equations Code: 00 { 54-Byte Prgm } Examples 0.000000 STO "A" 0.000010 STO "B" 1.000010 STO "C" XEQ "ENB_" 0.000045 XEQ "XY" 1.000084 Cheers Thomas |
|||
03-05-2019, 10:22 PM
Post: #3
|
|||
|
|||
Python: A LANGUAGE FOR DIGITAL DESIGN
Python Code
Code: def S(x): Python REPL Code: >>> S(ENB_()) |
|||
03-05-2019, 10:25 PM
Post: #4
|
|||
|
|||
Clojure: A LANGUAGE FOR DIGITAL DESIGN
Clojure Code
Code: (defn S Clojure REPL Code: user=> (S (ENB_)) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)