Hacker News new | past | comments | ask | show | jobs | submit login
One-bit Computing at 60 Hertz (laughtonelectronics.com)
107 points by 6502nerdface on Sept 10, 2016 | hide | past | web | favorite | 13 comments



"This is not a Motorola MC14500 computer, but it was the MC14500 that introduced me to the idea of one-bit computing. Exploring ways to reduce the chip count, a series of pencil & paper designs revealed the MC14500 itself could be omitted!"

That's really gold. I love these optimization rounds.

Worst experience in this was that I once spent a lot of time optimizing some function that looked like it was using a whole pile of time, only to realize afterwards that a hand-optimized version in assembly was already graciously provided in the same subdirectory. And it ran a lot faster than mine :(


More on that one with a VHDL description too:

http://www.brouhaha.com/~eric/retrocomputing/motorola/mc1450...

Handbook has this interesting statement: "When a job is dominated by calculations or data logging, a multi-bit processor is more appropriate. When the task is decision and command oriented, a one-bit machine is an excellent choice."

I'd like to see that put to the test with a number of simple, control systems to see how it measures up. Plus, I'd love to see the demoscene have a go at 4- and 1-bitters to see what they're really capable of.


The same author also has a very nice and detailed description of another project, the "KimKlone" [0], which is basically a coprocessor for the 65C02 CPU, injecting itself onto the address and data buses in such a way as to implement new "opcodes" for the 6502, effectively giving it extra registers and instructions designed to hardware accelerate a FORTH interpreter.

[0] http://laughtonelectronics.com/Arcana/KimKlone/Kimklone_intr...


Thanks for your interest in my projects, 6502nerdface. You've linked to the "chatty" KK article but there's kinduva TLDR version, which folks may prefer, here [1]. In particular the block diagram covers a lot of ground.

Regarding the One-bit computer: although that writeup is a few years old, it so happens that I tweaked a rewrote a few bits just few days ago! I'm pleased by how much attention it has attracted since it was first published. (At the same time it's startling that the mere mention of MC14500 left some apparently inattentive readers with a false impression. What I built is NOT a '4500 machine!)

[1] http://laughtonelectronics.com/Arcana/KimKlone/Kimklone_shor...


That's awesome. It's an actual use case for a OISC.

https://en.wikipedia.org/wiki/One_instruction_set_computer


not to in any way denigrate the design. its very cute an clever for simple controller applications. but it really kind of folds a few functions in the ur-instruction with reasonable interpretations that turn part of the machine into a nop.

the only part of the design that bothers me is the 2716. i think i've been spoiled by lots of years of having micro controllers one could program with a general purpose communications channel (hc11 shoutout)

i have to imagine this would be a great introduction to processors for non-specialists. a 20 chip ttl design with instruction decode and a register file and address multiplexing is beyond a lot of people's interest.

all those things are really here in concept though, just small enough that you can fit all of them in 8 bits.

thanks for posting that


>not to in any way denigrate the design. its very cute an clever for simple controller applications. but it really kind of folds a few functions in the ur-instruction with reasonable interpretations that turn part of the machine into a nop.

It's not like SUBLEQ is a very simple instruction either. It has to read two memory addresses, perform arithmetic, and write the result back, on top of possibly branching.

This machine writes a fixed bit to one address, and reads one bit from another address, branching on it. Even if you break it down into micro-ops, that's two instructions. Set-bit and branch. I'd call it simpler.


This seems extremely humble and yet extremely useful. I have not started looking into electrical engineering though I do have interest in it. How would this sort of chip scale? For sonething like an add, would you send each bit to a chip then collect all 1+1s and add them to correct bits? Im sincerely curious. Maybe I think this is more amazing than it is


This seems to be essentially a programmable state machine. You have a series of inputs, states encoded in program memory and a series of outputs. In a real computer, the whole state machine is usually constructed of gates and flip flops and tightly optimized. If fact a typical processor would contain hundreds of thousands of little state machines doing things like sequencing or flow control between different modules.

I don't think such a design would scale up. You cannot put 32 of these together and make a powerful 32-bit computer. There are lots of operations where the bit positions would need to interact. For example an adder where the carry bit must ripple between the bit positions.

Now which is better, this 1-bit computer of a 32-bit computer? It depends on what you want it to do. If all you want to do is take some switch inputs and turn on control some lights, maybe the 1-bit computer is simple, reliable and low latency. But what if you wanted to blink the lights or add some timer delays and suddenly that 1-bit computer doesn't meet your needs without adding a timer source.


First of all the machine should have enough RAM to hold the numbers you want to add. Say two 3-bit numbers a and b:

    a2 a1 a0
  + b2 b1 b0
  ----------
  = c2 c1 c0
Then to do the addition by testing one bit at a time think like

  if (a0==0)
    if (b0==0)
      c0 = 0;
    else 
      c0 = 1;
  else
    if (b0==0)
      c0 = 1;
    else 
      c0 = 0;
  ...


And how do you store the carry bits (this machine only has 2 bits of state)? Or do you encode carries by pure branching?


It would be tedious to do it all by pure branching. You would need a 64-way branch for c2. If you can't spare one separate RAM bit for a carry you could store the carries in the c2 location and start the computation of c2 by if (c2==...


Neat project, though as the author points out it's easier to switch to a microcontroller - and cheaper nowadays; you can get an ATtiny84 that would replace that whole circuit for less than what the 2716 EPROM alone costs.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: