ArticleslgStudy

computer science

One-instruction set computer

One-instruction set computer is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand One-instruction set computer rather than just read about it. In short: A one-instruction set computer (OISC), sometimes referred to as an ultimate reduced instruction set computer (URISC), is an abstract machine that uses only one instruction, obviating the need for a machine language opcode. With a judicious choice for the single instruction and given arbitrarily many resources, an OISC is capable of being a universal computer in the same manner as traditional computers that have mult…

One-instruction set computer — main illustration
One-instruction set computer — illustration

Key takeaways

  • One-instruction set computer belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect One-instruction set computer to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of One-instruction set computer from memory before moving on to harder problems.

Reference excerpt

A one-instruction set computer (OISC), sometimes referred to as an ultimate reduced instruction set computer (URISC), is an abstract machine that uses only one instruction, obviating the need for a machine language opcode. With a judicious choice for the single instruction and given arbitrarily many resources, an OISC is capable of being a universal computer in the same manner as traditional computers that have multiple instructions. OISCs have been recommended as aids in teaching computer architecture and have been used as computational models in structural computing research. The first carbon nanotube computer is a 1-bit one-instruction set computer (and has only 178 transistors).

Machine architecture In a Turing-complete model, each memory location can store an arbitrary integer, and, depending on the mode, there may be arbitrarily many locations. The instructions themselves reside in memory as a sequence of such integers. There exists a class of universal computers with a single instruction based on bit manipulation such as bit copying or bit inversion. Since their memory model is finite, as is the memory structure used in real computers, those bit manipulation machines are equivalent to real computers rather than to Turing machines. Currently known OISCs can be roughly separated into three broad categories:

Bit-manipulating machines Transport triggered architecture machines Arithmetic-based Turing-complete machines

Bit-manipulating machines

Bit-manipulating machines are the simplest class.

FlipJump The FlipJump machine has 1 instruction, a;b: flips the bit a, then jumps to b. This is a primitive OISC. It can do math/logic calculations, branching, pointers, and call functions.

BitBitJump A bit copying machine, called BitBitJump, copies one bit in memory and passes the execution unconditionally to the address specified by one of the operands of the instruction. This process is capable of universal computation through self-modifying code.

Toga computer

Another machine, called the Toga Computer, inverts a bit and passes the execution conditionally depending on the result of inversion. The unique instruction is TOGA(a,b) which stands for TOGgle a And branch to b if the result of the toggle operation is true.

Multi-bit copying machine Similar to BitBitJump, a multi-bit copying machine copies several bits at the same time. The problem of computational universality is solved in this case by keeping predefined jump tables in the memory.

Transport triggered architecture Transport triggered architecture (TTA) is a design in which computation is a side effect of data transport. Usually, some memory registers (triggering ports) within common address space perform an assigned operation when the instruction references them. For example, in an OISC using a single memory-to-memory copy instruction, this is done by triggering ports that perform arithmetic and instruction pointer jumps when written to.

Arithmetic-based Turing-complete machines Arithmetic-based Turing-complete machines use an arithmetic operation and a conditional jump. Like the two previous universal computers, this class is also Turing-complete. The instruction operates on integers which may also be addresses in memory. Currently there are several known OISCs of this class, based on different arithmetic operations:

addition (addleq, add and branch if less than or equal to zero) decrement (DJN, Decrement and branch (Jump) if Nonzero) increment (P1eq, Plus 1 and branch if equal to another value) subtraction (subleq, subtract and branch if less than or equal to zero) positive subtraction when possible, else branch (Arithmetic machine)

Instruction types Common choices for the single instruction are:

Subtract and branch if less than or equal to zero Subtract and branch if negative Subtract if positive else branch Reverse subtract and skip if borrow Move (used as part of a transport triggered architecture) Subtract and branch if non zero (SBNZ a, b, c, destination) Cryptoleq (heterogeneous encrypted and unencrypted computation) Only one of these instructions is used in a given implementation. Hence, there is no need for an opcode to identify which instruction to execute; the choice of instruction is inherent in the design of the machine, and an OISC is typically named after the instruction it uses (e.g., an SBN OISC, the SUBLEQ language, etc.). Each of the above instructions can be used to construct a Turing-complete OISC. This article presents only subtraction-based instructions among those that are not transport triggered. However, it is possible to construct Turing complete machines using an instruction based on other arithmetic operations, e.g., addition. For example, one variation known as DLN (Decrement and jump if not zero) has only two operands and uses decrement as the base operation. For more information see Subleq derivative languages [1].

Subtract and branch if not equal to zero The SBNZ a, b, c, d instruction ("subtract and branch if not equal to zero") subtracts the contents at address a from the contents at address b, stores the result at address c, and then, if the result is not 0, transfers control to address d (if the result is equal to zero, execution proceeds to the next instruction in sequence).

Subtract and branch if less than or equal to zero The subleq instruction ("subtract and branch if less than or equal to zero") subtracts the contents at address a from the contents at address b, stores the result at address b, and then, if the result is not positive, transfers control to address c (if the result is positive, execution proceeds to the next instruction in sequence). Pseudocode:

Instruction subleq a, b, c Mem[b] = Mem[b] - Mem[a] if (Mem[b] ≤ 0) goto c

Conditional branching can be suppressed by setting the third operand equal to the address of the next instruction in sequence. If the third operand is not written, this suppression is implied. A variant is also possible with two operands and an internal accumulator, where the accumulator is subtracted from the memory location specified by the first operand. The result is stored in both the accumulator and the memory location, and the second operand specifies the branch address:

Instruction subleq2 a, b Mem[a] = Mem[a] - ACCUM ACCUM = Mem[a] if (Mem[a] ≤ 0) goto b

Although this uses only two (instead of three) operands per instruction, correspondingly more instructions are then needed to effect various logical operations.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with One-instruction set computer

Start with the simplest possible case. Write down what One-instruction set computer claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to One-instruction set computer before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about One-instruction set computer ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of One-instruction set computer

In research
One-instruction set computer appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses One-instruction set computer in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
One-instruction set computer is common in secondary-school and first-year university syllabi. It links to neighbouring topics Esoteric programming languages, Models of computation, so understanding it makes those chapters shorter.
In everyday life
Look for One-instruction set computer outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “One-instruction set computer” →

How to study One-instruction set computer in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what One-instruction set computer means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain One-instruction set computer out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is One-instruction set computer in simple terms?

A one-instruction set computer (OISC), sometimes referred to as an ultimate reduced instruction set computer (URISC), is an abstract machine that uses only one instruction, obviating the need for a machine language opcode. With a judicious choice for the single instruction and given arbitrarily man…

Why does One-instruction set computer matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study One-instruction set computer?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on One-instruction set computer.

Tags

  • Esoteric programming languages
  • Models of computation

Keep exploring