Could an IBM mainframe from the 1960s mine Bitcoin? The idea seemed crazy, so I decided to find out. I implemented the Bitcoin hash algorithm in assembly code for the IBM 1401 and tested what is bitcoin calculator mining on a working vintage mainframe. It turns out that this computer could mine, but so slowly it would take more than the lifetime of the universe to successfully mine a block.

How Bitcoin mining works Bitcoin, a digital currency that can be transmitted across the Internet, has attracted a lot of attention lately. If you’re not familiar with how it works, the Bitcoin system can be thought of as a ledger that keeps track of who owns which bitcoins, and allows them to be transferred from one person to another. The interesting thing about Bitcoin is there’s no central machine or authority keeping track of things. Mining requires a task that is very difficult to perform, but easy to verify. Bitcoin mining uses cryptography, with a hash function called double SHA-256. With a cryptographic hash, there’s no way to get a hash value you want without trying a whole lot of inputs.

But once you find an input that gives the value you want, it’s easy for anyone to verify the hash. The dark blue boxes mix up the values in non-linear ways that are hard to analyze cryptographically. If you could figure out a mathematical shortcut to generate successful hashes, you could take over Bitcoin mining. The Ch “choose” box chooses bits from F or G, based on the value of input E. Internally, the computer was very different from modern computers. Since it was a business machine, the computer used decimal arithmetic instead of binary arithmetic and each character of storage held a digit, 0 through 9. Performance comparison The IBM 1401 can compute a double SHA-256 hash in 80 seconds.

It requires about 3000 Watts of power, roughly the same as an oven or clothes dryer. 125,600, which is about a million dollars in 2015 dollars. Networking You might think that Bitcoin would be impossible with 1960s technology due to the lack of networking. Would one need to mail punch cards with the blockchain to the other computers?

While you might think of networked computers as a modern thing, IBM supported what they call teleprocessing as early as 1941. Conclusion Implementing SHA-256 in assembly language for an obsolete mainframe was a challenging but interesting project. The decimal arithmetic of a business computer is a very poor match for a binary-optimized algorithm like SHA-256. How many cards did you have to throw away before you had the complete program? I developed the program on the ROPE 1401 simulator, so I only needed to punch it once.