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 languageopcode.[1][2][3] 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.[2]: 55 OISCs have been recommended as aids in teaching computer architecture[1]: 327 [2]: 2 and have been used as computational models in structural computing research.[3] The first carbon nanotube computer is a 1-bit one-instruction set computer (and has only 178 transistors).[4]
Machine architecture
In a Turing-complete model, each memory location can store an arbitrary integer, and – depending on the model[clarification needed] – 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.[5]
Currently known OISCs can be roughly separated into three broad categories:
The FlipJump machine has 1 instruction, a;b - flips the bit a, then jumps to b. This is the most primitive OISC, but it's still useful. It can successfully do math/logic calculations, branching, pointers, and calling functions with the help of its standard library.
BitBitJump
A bit copying machine,[5] 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 turns out to be capable of universal computation (i.e. being able to execute any algorithm and to interpret any other universal machine) because copying bits can conditionally modify the copying address that will be subsequently executed.
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 aAnd branch to b if the result of the toggle operation is true.
This section needs expansion. You can help by adding to it. (December 2016)
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.[clarification needed]
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)[6]
decrement (DJN, Decrement and branch (Jump) if Nonzero)[7]
increment (P1eq, Plus 1 and branch if equal to another value)[8]
subtraction (subleq, subtract and branch if less than or equal to zero)[9][10]
positive subtraction when possible, else branch (Arithmetic machine)[11]
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,[2]: 41 the SUBLEQ language,[3]: 4 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).[3]
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).[3]: 4–7 Pseudocode:
Instructionsubleqa,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:
Instructionsubleq2a,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.
Synthesized instructions
It is possible to synthesize many types of higher-order instructions using only the subleq instruction.[3]: 9–10
Unconditional branch:
JMP c
subleqZ,Z,c
Addition can be performed by repeated subtraction, with no conditional branching; e.g., the following instructions result in the content at location a being added to the content at location b:
ADD a, b
subleqa,ZsubleqZ,bsubleqZ,Z
The first instruction subtracts the content at location a from the content at location Z (which is 0) and stores the result (which is the negative of the content at a) in location Z. The second instruction subtracts this result from b, storing in b this difference (which is now the sum of the contents originally at a and b); the third instruction restores the value 0 to Z.
A copy instruction can be implemented similarly; e.g., the following instructions result in the content at location b getting replaced by the content at location a, again assuming the content at location Z is maintained as 0:
MOV a, b
subleqb,bsubleqa,ZsubleqZ,bsubleqZ,Z
Any desired arithmetic test can be built. For example, a branch-if-zero condition can be assembled from the following instructions:
Subleq2 can also be used to synthesize higher-order instructions, although it generally requires more operations for a given task. For example, no fewer than 10 subleq2 instructions are required to flip all the bits in a given byte:
NOT a
subleq2tmp; tmp = 0 (tmp = temporary register)subleq2tmpsubleq2one; acc = -1subleq2a; a' = a + 1subleq2Z; Z = - a - 1subleq2tmp; tmp = a + 1subleq2a; a' = 0subleq2tmp; load tmp into accsubleq2a; a' = - a - 1 ( = ~a )subleq2Z; set Z back to 0
Emulation
The following program (written in pseudocode) emulates the execution of a subleq-based OISC:
This program assumes that memory[] is indexed by nonnegative integers. Consequently, for a subleq instruction (a, b, c), the program interprets a < 0, b < 0, or an executed branch to c < 0 as a halting condition. Similar interpreters written in a subleq-based language (i.e., self-interpreters, which may use self-modifying code as allowed by the nature of the subleq instruction) can be found in the external links below.
A general purpose SMP-capable 64-bit operating system called Dawn OS has been implemented in an emulated Subleq machine. The OS contains a C-like compiler. Some memory areas in the virtual machine are used for peripherals like the keyboard, mouse, hard drives, network card, etc. Basic applications written for it include a media player, painting tool, document reader and scientific calculator.[13]
A 32-bit Subleq computer with a graphic display and a keyboard called Izhora has been constructed by Yoel Matveyev as a large cellular automation pattern.[14][15]
Compilation
There is a compiler called Higher Subleq written by Oleg Mazonka that compiles a simplified C program into subleq code.[16]
Alternatively there is a self hosting Forth implementation written by Richard James Howe that runs on top of a Subleq VM and is capable of interactive programming of the Subleq machine [17]
Subtract and branch if negative
The subneg instruction ("subtract and branch if negative"), also called SBN, is defined similarly to subleq:[2]: 41, 51–52
Instructionsubnega,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.
Synthesized instructions
It is possible to synthesize many types of higher-order instructions using only the subneg instruction. For simplicity, only one synthesized instruction is shown here to illustrate the difference between subleq and subneg.
where Z and POS are locations previously set to contain 0 and a positive integer, respectively;
Unconditional branching is assured only if Z initially contains 0 (or a value less than the integer stored in POS). A follow-up instruction is required to clear Z after the branching, assuming that the content of Z must be maintained as 0.
subneg4
A variant is also possible with four operands – subneg4. The reversal of minuend and subtrahend eases implementation in hardware. The non-destructive result simplifies the synthetic instructions.
Instructionsubnegs,m,r,j(* subtrahend, minuend, result and jump addresses *)
Mem[r] = Mem[m] - Mem[s]
if (Mem[r] < 0)
goto j
Arithmetic machine
In an attempt to make Turing machine more intuitive, Z. A. Melzak consider the task of computing with positive numbers. The machine has an infinite abacus, an infinite number of counters (pebbles, tally sticks) initially at a special location S. The machine is able to do one operation:
Take from location X as many counters as there are in location Y and transfer them to location Z and proceed to instruction y.
If this operation is not possible because there is not enough counters in X, then leave the abacus as it is and proceed to instruction n. [18]
In order to keep all numbers positive and mimic a human operator computing on a real world abacus, the test is performed before any subtraction. Pseudocode:
InstructionmelzakX,Y,Z,n,yif (Mem[X] < Mem[Y])
goto n
Mem[X] -= Mem[Y]
Mem[Z] += Mem[Y]
goto y
After giving a few programs: multiplication, gcd, computing the n-th prime number, representation in base b of an arbitrary number, sorting in order of magnitude, Melzak shows explicitly how to simulate an arbitrary Turing machine on his arithmetic machine.
MUL p, q
multiply:melzakP,ONE,S,stop; Move 1 counter from P to S. If not possible, move to stop.melzakS,Q,ANS,multiply,multiply; Move q counters from S to ANS. Move to the first instruction.stop:
where the memory location P is p, Q is q, ONE is 1, ANS is initially 0 and at the end pq, and S is a large number.
He mentions that it can easily be shown using the elements of recursive functions that every number calculable on the arithmetic machine is computable. A proof of which was given by Lambek[19] on an equivalent two instruction machine : X+ (increment X) and X− else T (decrement X if it not empty, else jump to T).
Reverse subtract and skip if borrow
In a reverse subtract and skip if borrow (RSSB) instruction, the accumulator is subtracted from the memory location and the next instruction is skipped if there was a borrow (memory location was smaller than the accumulator). The result is stored in both the accumulator and the memory location. The program counter is mapped to memory location 0. The accumulator is mapped to memory location 1.[2]
Instructionrssbx
ACCUM = Mem[x] - ACCUM
Mem[x] = ACCUM
if (ACCUM < 0)
goto PC + 2
Example
To set x to the value of y minus z:
# First, move z to the destination location x.RSSBtemp# Three instructions required to clear acc, temp [See Note 1]RSSBtempRSSBtempRSSBx# Two instructions clear acc, x, since acc is already clearRSSBxRSSBy# Load y into acc: no borrowRSSBtemp# Store -y into acc, temp: always borrow and skipRSSBtemp# SkippedRSSBx# Store y into x, acc# Second, perform the operation.RSSBtemp# Three instructions required to clear acc, tempRSSBtempRSSBtempRSSBz# Load zRSSBx# x = y - z [See Note 2]
[Note 1] If the value stored at "temp" is initially a negative value and the instruction that executed right before the first "RSSB temp" in this routine borrowed, then four "RSSB temp" instructions will be required for the routine to work.
[Note 2] If the value stored at "z" is initially a negative value then the final "RSSB x" will be skipped and thus the routine will not work.
A transport triggered architecture uses only the move instruction, hence it was originally called a "move machine". This instruction moves the contents of one memory location to another memory location combining with the current content of the new location:[2]: 42 [20]
Instructionmovxa,b (also written a -> b)
OP = GetOperation(Mem[b])
Mem[b] := OP(Mem[a], Mem[b])
The operation performed is defined by the destination memory cell. Some cells are specialized in addition, some other in multiplication, etc. So memory cells are not simple store but coupled with an arithmetic logic unit (ALU) setup to perform only one sort of operation with the current value of the cell. Some of the cells are control flow instructions to alter the program execution with jumps, conditional execution, subroutines, if-then-else, for-loop, etc...
A commercial transport triggered architecture microcontroller has been produced called MAXQ, which hides the apparent inconvenience of an OISC by using a "transfer map" that represents all possible destinations for the move instructions.[21]
Cryptoleq
Cryptoleq[22] is a language similar to Subleq. It is consisting of one eponymous instruction and is capable of performing general-purpose computation on encrypted programs. Cryptoleq works on continuous cells of memory using direct and indirect addressing, and performs two operations O1 and O2 on three values A, B, and C:
Instructioncryptoleqa,b,c
Mem[b] = O1(Mem[a], Mem[b])
if O2(Mem[b]) ≤ 0
IP = c
else
IP = IP + 3
where a, b and c are addressed by the instruction pointer, IP, with the value of IP addressing a, IP + 1 point to b and IP + 2 to c.
In Cryptoleq operations O1 and O2 are defined as follows:
The main difference with Subleq is that in Subleq, O1(x,y) simply subtracts y from x and O2(x) equals to x. Cryptoleq is also homomorphic to Subleq, modular inversion and multiplication is homomorphic to subtraction and the operation of O2 corresponds the Subleq test if the values were unencrypted. A program written in Subleq can run on a Cryptoleq machine, meaning backwards compatibility. However, Cryptoleq implements fully homomorphic calculations and is capable of multiplications. Multiplication on an encrypted domain is assisted by a unique function G that is assumed to be difficult to reverse engineer and allows re-encryption of a value based on the O2 operation:
where is the re-encrypted value of y and is encrypted zero. x is the encrypted value of a variable, let it be m, and equals .
The multiplication algorithm is based on addition and subtraction, uses the function G and does not have conditional jumps nor branches. Cryptoleq encryption is based on Paillier cryptosystem.
^ abMavaddat, F.; Parhami, B. (October 1988). "URISC: The Ultimate Reduced Instruction Set Computer"(PDF). International Journal of Electrical Engineering Education. 25 (4). Manchester University Press: 327–334. doi:10.1177/002072098802500408. S2CID61797084. Retrieved 2010-10-04.
This paper considers "a machine with a single 3-address instruction as the ultimate in RISC design (URISC)". Without giving a name to the instruction, it describes a SBN OISC and its associated assembly language, emphasising that this is a universal (i.e., Turing-complete) machine whose simplicity makes it ideal for classroom use.
^Jones, Douglas W. (June 1988). "The Ultimate RISC". ACM SIGARCH Computer Architecture News. 16 (3). New York: ACM: 48–55. doi:10.1145/48675.48683. S2CID9481528. Retrieved 2010-10-04.
"Reduced instruction set computer architectures have attracted considerable interest since 1980. The ultimate RISC architecture presented here is an extreme yet simple illustration of such an architecture. It has only one instruction, move memory to memory, yet it is useful."
^Mazonka, Oleg; Tsoutsos, Nektarios Georgios; Maniatakos, Michail (2016), "Cryptoleq: A Heterogeneous Abstract Machine for Encrypted and Unencrypted Computation", IEEE Transactions on Information Forensics and Security, 11 (9): 2123–2138, doi:10.1109/TIFS.2016.2569062, S2CID261387
Province of Canada This article is about the Canadian province. For other uses, see Ontario (disambiguation). Province in CanadaOntarioProvince FlagCoat of armsMotto(s): Ut Incepit Fidelis Sic Permanet (Latin)(Loyal she began, loyal she remains) BC AB SK MB ON QC NB PE NS NL YT NT NU Coordinates: 49°15′N 84°30′W / 49.250°N 84.500°W / 49.250; -84.500[1]CountryCanadaBefore confederationCanada WestConfederationJuly 1, 1867 (1st, with New Brunswic...
Terdapat sebelas hari libur di Singapura: Tahun Baru Imlek (dua hari), hari libur Buddhis Waisak (satu hari), dua hari libur Islam Hari Raya Idul Fitri (1 Syawal) dan Hari Raya Idul Adha (10 Zulhijah), hari libur Hindu Deepavali (satu hari), dua hari libur Kristen Jumat Agung dan Hari Natal (25 Desember), dan hari libur sekuler Hari Tahun Baru, Hari Buruh dan Hari Nasional. Hari libur terebut disahkan sejak Undang-Undang Pekerjaan 1968 di Singapura. Hari-hari yang disahkan sebagai hari libur ...
Mario Götze Götze bersama timnas Jerman pada 2011Informasi pribadiNama lengkap Mario Götze[1]Tanggal lahir 3 Juni 1992 (umur 31)Tempat lahir Memmingen, JermanTinggi 176 cm (5 ft 9 in)[2]Posisi bermain Gelandang serang,[3] penyerang[4]Informasi klubKlub saat ini Eintracht FrankfurtKarier junior1995–1998 SC Ronsberg1998–2001 FC Eintracht Hombruch2001–2009 Borussia DortmundKarier senior*Tahun Tim Tampil (Gol)2009–2013 Borussia Dortm...
Часть серии статей о Холокосте Идеология и политика Расовая гигиена · Расовый антисемитизм · Нацистская расовая политика · Нюрнбергские расовые законы Шоа Лагеря смерти Белжец · Дахау · Майданек · Малый Тростенец · Маутхаузен ·&...
Contoh dari hidangan Bali, seperti sate lilit, nasi kuning, lawar, dan pelengkap berupa sambal lala manis Artikel ini merupakan bagian dari seriHidangan Indonesia Hidangan nasional Gado-gado Nasi goreng Rendang Sate Soto Tumpeng Masakan daerah dan budaya Aceh Arab Bali Banjar Batak Gorontalo Betawi Tionghoa India Indo Jawa Madura Makassar Melayu Minahasa Minangkabau Palembang Peranakan Sunda Maluku Papua Bahan Bumbu Penyedap Bumbu kacang Sambal Santan Jenis makanan Makanan Masakan Mi Sup Hida...
Orang Vietnam di Jepang在日ベトナム人Người Việt ở NhậtJumlah populasi371.755 (Juni 2019)[1]Daerah dengan populasi signifikanTokyo, Osaka (Ikuno-ku), Yokohama, Kobe(Nagata-ku, Hyogo-ku)BahasaJepang, VietnamAgamaBuddha,[2][3] Katolik[4]Kelompok etnik terkaitOrang Vietnam Orang Vietnam di Jepang (在日ベトナム人code: ja is deprecated , Zainichi Betonamujin, Người Việt ở Nhật) menjadi komunitas penduduk asing ketiga terbesar di Jepang...
Disambiguazione – Serenissima rimanda qui. Se stai cercando altri significati, vedi Serenissima (disambigua). Repubblica di Venezia (dettagli) (dettagli) Motto: Viva San Marco! Repubblica di Venezia - LocalizzazioneLa Repubblica di Venezia nel 1789, alla vigilia della Rivoluzione francese Dati amministrativiNome completoSerenissima Repubblica di Venezia Nome ufficialeSerenissima Repubblica di Venezianomi precedenti Lingue ufficialide facto: latino, veneto, italiano Lingue parlateDo...
This article may be confusing or unclear to readers. Please help clarify the article. There might be a discussion about this on the talk page. (April 2009) (Learn how and when to remove this template message) Anterior external arcuate fibersIdentifiersNeuroLex IDbirnlex_1628Anatomical terms of neuroanatomy[edit on Wikidata] Anterior external arcuate fibersDiagram showing the course of the arcuate fibers. (Testut.) 1. Medulla oblongata anterior surface. 2. Anterior median fissure. 3. Fourt...
Region in AustraliaMitchell Grass DownsAustraliaThe interim Australian bioregions,with Mitchell Grass Downs in redArea334,687.61 km2 (129,223.6 sq mi) Localities around Mitchell Grass Downs: Sturt Plateau Gulf Fall and Uplands Mount Isa Inlier Tanami Mitchell Grass Downs Desert Uplands Channel Country Channel Country Mulga Lands The Mitchell Grass Downs (MGD) is an IBRA biogeographic region, located in the Northern Territory and Queensland,[1][2] which comprise...
A liquid nitrogen engine is powered by liquid nitrogen, which is stored in a tank. Traditional nitrogen engine designs work by heating the liquid nitrogen in a heat exchanger, extracting heat from the ambient air and using the resulting pressurized gas to operate a piston or rotary motor. Vehicles propelled by liquid nitrogen have been demonstrated, but are not used commercially. One such vehicle, Liquid Air, was demonstrated in 1902. Liquid nitrogen propulsion may also be incorporated in hyb...
Not to be confused with Kanaya Station or Kamaya Station (Aichi). Railway station in Kikonai, Hokkaido, Japan Kamaya Station釜谷駅Kamaya Station, September 2022General informationLocationKikonai, Kamiiso District, HokkaidoJapanOperated bySouth Hokkaido Railway CompanyLine(s)South Hokkaido Railway LineHistoryOpened1930LocationKamaya StationLocation within HokkaidoShow map of HokkaidoKamaya StationKamaya Station (Japan)Show map of Japan Kamaya Station (釜谷駅, Kamaya-eki) is a railway sta...
Terra AustralisTerra Australis is the large continent on the bottom of this 1570 map This list of Antarctica expeditions is a chronological list of expeditions involving Antarctica. Although the existence of a southern continent had been hypothesized as early as the writings of Ptolemy in the 1st century AD, the South Pole was not reached until 1911. Pre-exploration theories 600 BC – 300 BC – Greek Philosophers theorize Spherical Earth with North and South Polar regions. 150 AD – Ptole...
2004 United States House of Representatives elections in New Jersey ← 2002 November 2, 2004 (2004-11-02) 2006 → All 13 New Jersey seats to the United States House of Representatives Majority party Minority party Party Democratic Republican Last election 7 6 Seats won 7 6 Seat change Popular vote 1,721,392 1,514,784 Percentage 52.41% 46.12% Results: Democratic hold ...
Sculpture by Gian Lorenzo Bernini Bust of Cardinal Roberto BellarmineArtistGian Lorenzo BerniniCompletion dateAugust 1624 (1624-08)MediumMarbleSubjectRobert BellarmineLocationChiesa del Gesù, RomePreceded byBust of Cardinal Escoubleau de SourdisFollowed byBust of Alessandro Peretti di Montalto The Bust of Cardinal Roberto Bellarmine is a half-length portrait of Saint Robert Bellarmine by the Italian artist Gian Lorenzo Bernini. It was executed in the years 1621–1624, an...
Cet article est une ébauche concernant les Pyrénées, les Pyrénées-Atlantiques et la Gascogne. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Consultez la liste des tâches à accomplir en page de discussion. Carte de la Novempopulanie Les Suburates, appelés aussi Sibusates/Sibulates par César[1] ou Sybillates par Pline[2], étaient un peuple aquitain ou proto-basque qui habitait l'actuelle province basqu...
Questa voce o sezione sugli argomenti stati scomparsi e Paesi Bassi non cita le fonti necessarie o quelle presenti sono insufficienti. Commento: Totale assenza di fonti Puoi migliorare questa voce aggiungendo citazioni da fonti attendibili secondo le linee guida sull'uso delle fonti. Segui i suggerimenti del progetto di riferimento. Paesi Bassi borgognoni (dettagli) Paesi Bassi borgognoni - LocalizzazioneI Paesi Bassi borgognoni nel 1477 Dati amministrativiLingue parlateOlandese, Basso ...