Malbolge programming : One of the toughest programming language

   
     We are using many programming languages like Java, Python, C, C++ and more for developing new and amazing technology so that humans can easily do everything they want. There are some programming language which are very difficult, and also there are some programming languages which are very easy. Today in these post i m going to discuss about Malbolge programming language which is one of the toughest programming language.

👉Malbolge Programming:


     Malbolge is a public domain esoteric language invented by Ben Olmstead in year 1998. The name "Malbolge" is derived from 8th circle of hell in Dante's Inferno. Malbolge was specially designed to be almost impossible to use via counter intuitive crazy operation, base three arithmetic and self altering code. It builds on the difficulty of earlier, challenging esoteric languages, but takes this aspect to the extreme, playing on the entangled histories of computer science and encryption. Despite this design, it is possible to write useful Malbolge programs.

👉How difficult this programming languages is?

     Malbolge was so difficult to understand when it arrived that it took two years for the first Malbolge program to appear. Indeed, the author himself has never written a singe Malbolge program. The first Malbolge program was not written by human being, it was generated by a beam search algorithm (Heuristic Search Algorithm) which is designed by Andrew Cooke and implemented in Lisp (type of computer program). Hisashi lizawa proposed a guide for programming in Malbolge for the purpose of the application for obfuscation in software protection.

    Malbolge is machine language for a ternary virtual machine, the Malbolge interpreter. The standard interpreter and the official specification do not match perfectly. One difference is that the compiler stops execution with data outside the 33-126 range. Although this was initially consider a bug in the compiler, Ben Olmstead stated that it was intended and there was in fact "a bug in the specification".

👉Registers in Malbolge:

      Malbolge has three registers that are a,c,and d. Initially the value of all three reguster is zero.
Register A stands for Accumulator, Register C is the Code pointer and Register D is the Data pointer.

👉Malbolge Instructions:


Value of
([c] + c) % 94
Instruction
represented
Explanation
4jmp [d]The value at [d] is where Malbolge will jump to and start executing instructions.
5out aPrints the value of a, as an ASCII character, to the screen.
23in aInputs a character, as an ASCII code, into a. Newlines or line feeds are both code 10. An end-of-file condition is code 59048.
39rotr [d]
mov a, [d]
Rotates the value at [d] by one ternary digit (0002111112 becomes 2000211111). Stores the result both at [d] and in a.
40mov d, [d]Copies the value at [d] to d.
62crz [d], a
mov a, [d]
Does the crazy operation (see below) with the value at [d] and the value of a. Stores the result both at [d] and in a.
68nopDoes nothing.
81endEnds the Malbolge program.
Any other valuedoes the same as 68: nothing. These other values are not allowed in a program while it is being loaded, but are allowed afterwards.

     Malbolge has eight instructions. Malbolge figures out which instruction to execute by taking the value [C], adding the value of C to it , and taking the remainder when this is divided by 94.The final result tells the interpreter what to do
     After each instruction is executed, the guilty instruction gets encrypted so that it will not do same thing next time, unless a jump just happened, Right after a jump, Malbolge will encrypt the innocent instruction just prior to the one it jumped to instead. Then, the values of both C and D are increased by one and the next instruction is executed.

👉Crazy Operation:

crzInput 2
012
Input 10100
1102
2221

👉Encryption Table:

ResultEncryptedResultEncryptedResultEncryptedResultEncryptedResultEncrypted
057191083811357917679
1109201253911658377765
26021824012159927849
34622694110260517967
4842311142114611008066
58624107433662768154
69725784440634382118
79926584511964818394
89627354610165598461
91172863475266628573
108929714812367858695
11423034498768338748
1277311055080691128847
13753264514170748956
143933535272718390124
1588341225345725591106
1612635935490735092115
1712036385511074709398
186837103564475104

👉Some Examples of Malbolge Programming:


1. To print "Hello World!"
      (=<`#9]~6ZY32Vx/4Rs+0No-&Jk)"Fh}|Bcy?`=*z]Kw%oG4UUS0/@-ejc(:'8dc
   
2. To read a string from a user and  print that string
     (=BA#9"=<;:3y7x54-21q/p-,+*)"!h%B0/.
     ~P<
      <:(8&
      66#"!~}|{zyxwvu
      gJ%
     If you want to do some challenging you can try this language. This is toughest programming language if you have excellent coding skills you can try this Malbolge language
     If you find this post is helpful then share with friends so that they get idea about "Malbolge Programming" & don't forget to follow and subscribe our blog to get notification of each and every update. If you have query them ask me in comment section & you can also suggest topics for next post. Connect to our social media platform for more updates all links are available in contact us section of our blog.
For more technical details in hindi check out our youtube channel 
👇👇👇👇👇👇👇👇👇

Comments

Popular posts from this blog

Billion capture+: specs, price,availability & my opinions

How to get MIUI 9? Here are some features!!

What is blog? how to create a blog?