If you are [Low Level JavaScript], the answer is obvious: You create a 7400 TTL logic simulator in JavaScript. The gate simulations progress from simple gates up to flipflops and registers.