HardwareBanter

HardwareBanter (http://www.hardwarebanter.com/index.php)
-   Intel (http://www.hardwarebanter.com/forumdisplay.php?f=9)
-   -   What is the absolute smallest instruction set do you need to make aworking computer? (http://www.hardwarebanter.com/showthread.php?t=199703)

Yousuf Khan[_2_] September 21st 19 11:45 PM

What is the absolute smallest instruction set do you need to make aworking computer?
 
What's your guess? 100 instructions? 50 instructions? 10? Would you
believe just 1 instruction!? And that instruction is implied, you don't
even need an opcode for that! And you're not going to believe what that
one instruction is either! This video explains how it's possible.

https://youtu.be/jRZDnetjGuo

Yousuf Khan

Roger Blake[_2_] September 22nd 19 01:49 AM

What is the absolute smallest instruction set do you need tomake a working computer?
 
On 2019-09-21, Yousuf Khan wrote:
What's your guess? 100 instructions? 50 instructions? 10? Would you
believe just 1 instruction!? And that instruction is implied, you don't
even need an opcode for that! And you're not going to believe what that
one instruction is either! This video explains how it's possible.

https://youtu.be/jRZDnetjGuo


Interesting. In terms of commercially-successful CPUs the most minimal
I've worked with was the DEC PDP-8, which had 8 instructions (3-bit opcode).
However, one of those (OPR) permitted the programmer to combine several
operations into one instruction cycle by setting the appropriate bits.

The PDP-8 was a 12-bit word-oriented machine sold from 1965-1979. Early
models used discrete transistors, the last models were CMOS microprocessors.
There was also a serial model that operated on one bit at a time - slow!!
No stack was employed - subroutines worked via the caller writing the
return address into the first word of the called routine. Fun times!

--
-----------------------------------------------------------------------------
Roger Blake (Posts from Google Groups killfiled due to excess spam.)

NSA sedition and treason -- http://www.DeathToNSAthugs.com
Don't talk to cops! -- http://www.DontTalkToCops.com
Badges don't grant extra rights -- http://www.CopBlock.org
-----------------------------------------------------------------------------

Arlen Holder September 22nd 19 02:21 AM

What is the absolute smallest instruction set do you need to make a working computer?
 
On Sun, 22 Sep 2019 00:49:48 -0000 (UTC), Roger Blake wrote:

Interesting. In terms of commercially-successful CPUs the most minimal
I've worked with was the DEC PDP-8, which had 8 instructions (3-bit opcode).


A nand gate can implement all Boolean operations, can't it?
:)

Jeff Barnett September 22nd 19 05:04 AM

What is the absolute smallest instruction set do you need to makea working computer?
 
Yousuf Khan wrote on 9/21/2019 10:46 PM:
On 9/21/2019 9:21 PM, Arlen Holder wrote:
On Sun, 22 Sep 2019 00:49:48 -0000 (UTC), Roger Blake wrote:

Interesting. In terms of commercially-successful CPUs the most minimal
I've worked with was the DEC PDP-8, which had 8 instructions (3-bit
opcode).


A nand gate can implement all Boolean operations, can't it?
:)


And so the answer is, the only instruction you need is a Subtract
instruction! A special subtract instruction that branches only when the
result is less than or equal to zero. The video explains how that works.


I haven't looked at the video but (trying to remember from the 1960s)
you need 2 registers and places to branch on either crossing 0.
Essentially one register is the right half and the other the left half
of the "tape" and you are working with 2 characters, etc., etc.. etc.
--
Jeff Barnett

Yousuf Khan[_2_] September 22nd 19 05:46 AM

What is the absolute smallest instruction set do you need to makea working computer?
 
On 9/21/2019 9:21 PM, Arlen Holder wrote:
On Sun, 22 Sep 2019 00:49:48 -0000 (UTC), Roger Blake wrote:

Interesting. In terms of commercially-successful CPUs the most minimal
I've worked with was the DEC PDP-8, which had 8 instructions (3-bit opcode).


A nand gate can implement all Boolean operations, can't it?
:)


And so the answer is, the only instruction you need is a Subtract
instruction! A special subtract instruction that branches only when the
result is less than or equal to zero. The video explains how that works.

Yousuf Khan

Yousuf Khan[_2_] September 22nd 19 06:00 AM

What is the absolute smallest instruction set do you need to makea working computer?
 
On 9/22/2019 12:04 AM, Jeff Barnett wrote:
I haven't looked at the video but (trying to remember from the 1960s)
you need 2 registers and places to branch on either crossing 0.
Essentially one register is the right half and the other the left half
of the "tape" and you are working with 2 characters, etc., etc.. etc.


This particular computer doesn't have any registers, it works directly
on memory. Now obviously in the background, the real chip might have
virtual registers that it uses as a buffer area, but that's completely
out of the control of the instruction set itself.

Jeff Barnett September 22nd 19 06:47 AM

What is the absolute smallest instruction set do you need to makea working computer?
 
Yousuf Khan wrote on 9/21/2019 11:00 PM:
On 9/22/2019 12:04 AM, Jeff Barnett wrote:
I haven't looked at the video but (trying to remember from the 1960s)
you need 2 registers and places to branch on either crossing 0.
Essentially one register is the right half and the other the left half
of the "tape" and you are working with 2 characters, etc., etc.. etc.


This particular computer doesn't have any registers, it works directly
on memory. Now obviously in the background, the real chip might have
virtual registers that it uses as a buffer area, but that's completely
out of the control of the instruction set itself.


The machine I'm trying to recall is Turing Complete. In other words it
can implement an interpreter that can "execute" any Turing machine with
any input tape - it's a theoretical machine. If you are talking about a
machine with real components, that's a horse of a different color and
quite puny in comparison. This 2 register machine, with few instructions
was all the theoretical rage some 60 or 70 years ago and was described
in many text books. I thought your original question was fishing for
what I described.

If you are interested in possible real machines, I believe that Dave
Ferguson got a patent in the 1950s or 1960s for a machine that only had
very few op code bits - 2 or 3. The meaning of those bits depended on
the previous instruction executed so one had to be extraordinary clever
in planning code sequences. SDS started to build a machine based on that
concept though I'm not sure it was ever put on the market.

Ferguson actually coded the most unbelievable hack that I ever ran into
but first a word of background: in the 1950s and 1960s IBM card readers
could either read a card by columns or by rows. There were cards that
you could read to boot various computers such as a 709, 7094, 1401, etc.
But note that you needed a different card if the reader was set in row
or column. The operators got it wrong all the time and were quite
frustrated. Ferguson developed a card punch pattern that would boot some
specific machine no matter how the reader was set. To understand the
degree of difficulty, booting meant reading some instructions from a mag
tape some of which overlapped the instructions brought in from the card
reader. There were timing considerations too.

That last paragraph has absolutely nothing to do with this thread's
theme but will I was remembering it, I thought I'd share the story.
--
Jeff Barnett

VanguardLH[_2_] September 22nd 19 07:26 AM

What is the absolute smallest instruction set do you need to make a working computer?
 
Yousuf Khan wrote:

What's your guess? 100 instructions? 50 instructions? 10? Would you
believe just 1 instruction!? And that instruction is implied, you don't
even need an opcode for that! And you're not going to believe what that
one instruction is either! This video explains how it's possible.

https://youtu.be/jRZDnetjGuo


https://en.wikipedia.org/wiki/One_in...n_set_computer
Concept proposed back in 1956.

It is a computational model used for teaching. It would be too slow for
physical implementation. That it can be done doesn't mean anyone cares.

Yousuf Khan[_2_] September 22nd 19 01:59 PM

What is the absolute smallest instruction set do you need to makea working computer?
 
On 9/22/2019 1:47 AM, Jeff Barnett wrote:
The machine I'm trying to recall is Turing Complete. In other words it
can implement an interpreter that can "execute" any Turing machine with
any input tape - it's a theoretical machine. If you are talking about a
machine with real components, that's a horse of a different color and
quite puny in comparison. This 2 register machine, with few instructions
was all the theoretical rage some 60 or 70 years ago and was described
in many text books. I thought your original question was fishing for
what I described.


Well, I don't know anything about "Turing Complete" machines. If such
Turing machines can be run through any current general purpose computer
architecture, then this theoretical machine should be able to run it too.

The concept is not about artificial intelligence, but about general
purpose computing at its most basic level. About 2 or 3 decades ago, we
had the debate about RISC vs. CISC architectures. Without getting into
debates about which of those concepts won in the end, this is taking
that debate to the next level, and asking what is the most basic set of
instructions that can eliminate all other instructions? So they've
eliminated every other instruction, and replaced it with this one
instruction, called SUBLEQ, "Subtract Less Than or Equal To". It only
does subtractions on data, and branches only when the result is less
than or equal to zero. So this is the ultimate RISC architecture, the
OISC (One Instruction Set Computing) architecture.

The page below links to an OISC interpreter and tools.

Oleg Mazonka - Languages - SUBLEQ
http://mazonka.com/subleq/

Yousuf Khan[_2_] September 22nd 19 03:25 PM

What is the absolute smallest instruction set do you need to makea working computer?
 
On 9/22/2019 2:26 AM, VanguardLH wrote:
https://en.wikipedia.org/wiki/One_in...n_set_computer
Concept proposed back in 1956.

It is a computational model used for teaching. It would be too slow for
physical implementation. That it can be done doesn't mean anyone cares.


Maybe, maybe not. It may not have been anything more than a curiosity in
the 50's. Back then memory was very slow, and the caching technologies
that have evolved over the decades was not available yet back then. So
back then you had to make sure you explicitly put everything into
registers. But these days, with your typical x86 machine being really a
RISC processor emulating a CISC processor, and they've come up with so
many automatic caching techniques that registers are no longer needed,
and you can really work directly on memory without any performance
penalties nowadays.

Yousuf Khan


All times are GMT +1. The time now is 02:43 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
HardwareBanter.com