• Welcome to Peterborough Linux User Group (Canada) Forum.
 

1-bit CPU

Started by Jason, December 23, 2023, 12:08:04 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Jason

For the guy that has everything - a "high class, super low-performance computer".

It is "programmed", if you can call it that, with 4 DIP switches to do one of 3 things. Flash an LED, Turn it on, or turn it off. But, there are 2 LEDs you can do it with, so there's that. It has a stellar clock speed of 1 Hz (i.e. one instruction per second).

Strangely, I want one. Reminds me of my basic electronics course in high school.

https://www.tomshardware.com/pc-components/cpus/1-bit-cpu-for-super-low-performance-computer-launched-sells-out-promptly?utm_source=pocket_saves

Here's a 30-second video of the prototype (before assembly) in action. Enjoy.


I'm thinking maybe you could run them in parallel for more computing power. You might be able to do basic arithmetic then. The mind boggles.

Merry Christmas everyone!
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

buster

"Strangely, I want one."

Strangely indeed. Just watch the movie Jason.
Growing up from childhood and becoming an adult is highly overrated.

Jason

Quote from: buster on December 23, 2023, 02:11:28 PM"Strangely, I want one."

Strangely indeed. Just watch the movie Jason.

I did. You have to appreciate the electronics involved in it. It's not just a timer. It takes input, adds a bit to it and outputs it via the LEDs. It's the simplest of processors. It's something probably only an electronics/microprocessors guy could appreciate.

It comes in kit form. So you solder it together. Which isn't something easily done today with most electronics. Think of it like changing the oil in your car. It might not be something you always want to do and you can pay somebody else to do it. But doing it at least once gives you that small endorphin boost that you accomplished something. Like that, this project it's something anyone can do and learn something from doing it. Especially, if you look into how it works.

https://basicbits.tech/1bitcpu/

1-bit computers also used to have applications where a full computer or even an Arduino is overkill, like in a PLC. Some serial controllers might even use them. But really, it's just meant to learn something and the novelty of it is cool.

Not everything has to be practical to be fun, Buster. :)
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

Jason

Btw, it's actually counting down in binary in the video so it's only random flashing lights to the uninformed. Say the LED on state represents 1, and LED off state represents 0. And the first LED on the left is the 2's group and the one on the right is the 1's group.

On-On   = 11 (binary) = 3 (decimal)
On-Off  = 10 (binary) = 2 (decimal)
Off-On  = 01 (binary) = 1 (decimal)
Off-Off = 00 (binary) = 0 (decimal)

The "processor" has two instructions does this through two "instructions" using the simplest of discrete logic chips. All processors have these two instructions, along with lots of others.

* Store a value (temporarily) in an accumulator (in the processor)
* Add 1 to the value (or the inverse of 1 in this case)

This logic board only works for 2-bits (output, 1-bit in the "processor"), so only values from 0 to 3. But in real processors, the same principle applies. You just use more bits.

Subtraction is done through adding the 1's complement of the binary number. The 1's complement is the binary number with the digits all reversed and then 1 is added. Take a number and add the 1's complement of the number you're subtracting. So 3 - 1 in decimal is handled like this in binary:

11 - 01, becomes:

11 + 11 (01 reversed to 10 and 1 added)
--------
10 (actually 110 but with only two bits, the first bit is excised)

The result, 10 (binary) equates to 2 in decimal. 3 - 1 = 2


= Multiplication is just multiple 'adds' (as Buster would point out). And division multiple subtractions. So everything is done through an 'add' operation.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

buster

It's interesting that there used to be some work done using a base 3 system rather than binary. The advantages were explained but seemed like too much work to decipher.

Years ago a friend of mine was astonished that all the movies and sound could be reduced to a binary system. He was surprised that this could be done. I wasn't because I knew all of Shakespeare's work could be reduced to Morse code. Morse Code does have the advantage of using spaces, which amounts to an extra symbol: dot, dash, space. But with speed, spaces can be accommodated into binary.

So Jason, how are spaces built into text using binary? This is not a trick question. If you know it would mean I wouldn't have to read the ramblings of a poorly communicating expert.
Growing up from childhood and becoming an adult is highly overrated.

Jason

#5
Spaces are just like any other character in binary. Every character in ASCII is represented by a single byte (8 bits, either 1 or 0) in memory or stage. A space is represented by 00100000 which is 32 in decimal. 00100000 is hard to write so programmers would use the hexadecimal (base 16) system which reduces it to 20, the 2 represents the first 4 bits and the 0, the last two bits.

That allows 255 characters which starts to run out quickly when you realize that includes control characters (like commands), punctuation, foreign language symbols, copyright and similar characters and so on. So they extended it with unicode which has 4 bytes, if I remember correctly. Enough for over 65,000 characters. Enough room for all those smileys on smart phones. :) Here's a cool chart showing how the characters are represented in ASCII.

https://www.ascii-code.com/

There's actually ASCII, which is represented by 7-bits (128 characters and control codes) and high ASCII (the other 128 characters but that just gets confusing.

I've never heard of using base 3 systems in computers except in quantum computers, which can have on, off and some quasi-state which isn't either. That exponentially increases the amount of computing power which is why quantum computers are so fast. I can't say I know much about them.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

Jason

Btw, there's even a character for null which is represented separately from 0. Null is the programming equivalent of no answer, undefined, I suppose you could say. Like when someone doesn't enter input where it's expected to be. If you ever see an error that has 'nan' in it, that's they Python (a programming language) equivalent of null. There was unexpected input (which could be from within the program and not the user).
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

buster

"I've never heard of using base 3 systems in computers except in quantum computers, which can have on, off and some quasi-state which isn't either."

Probably the first ternary calculating machine was built in 1840. You can read a little bit of ternary computers, history and future, here. And it's not very technical:

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

Growing up from childhood and becoming an adult is highly overrated.

Jason

Interesting. That first chart is clear as mud but reading on I see that the three tribits are 0, 1 and -1. I also see that Quantum Computers use qubits, so four states. So I was wrong about that.

And I have to say that I love the Robert Heinlein quote. You can't get much more hard sci-fi than this:

QuoteIn Robert A. Heinlein's novel Time Enough for Love, the sapient computers of Secundus, the planet on which part of the framing story is set, including Minerva, use an unbalanced ternary system. Minerva, in reporting a calculation result, says "three hundred forty one thousand six hundred forty... the original ternary readout is unit pair pair comma unit nil nil comma unit pair pair comma unit nil nil point nil"
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13