Hi Freelancers
This job must be done within next 24-48 hours. Pls see the details below -
“You are asked to build, in a language of PHP, java. and with assurance that the code is working as expected, an implementation of The Clifford Engine.
Description of the Clifford Engine
The Clifford Engine does one job but it does it well: it looks after a stack of numbers.
You can interact with the Engine by giving it a list of numbers. This represents a program in Clifford Code, described below. The Engine will execute the code and output the number at the top of the stack when the program terminates.
Clifford code is made up of a list of whitespace-separated numbers that are processed in sequence. Each instruction is made up of one or more digits, depending on the type of instruction. The first digit always specifies the type of instruction.
As of January 2012 the Clifford Engine supports the following instructions:
0 "Push" (takes 1 argument)
Pushes its argument onto the Clifford stack.
1 "Pop" (takes no arguments)
Discards the number at the top of the Clifford stack.
2 "Add" (takes no arguments)
Removes the top two numbers from the stack, adds them and then pushes the total back onto the stack.
3 "Subtract" (takes no arguments)
Removes the top two numbers from the stack, subtracts them and then pushes the total back onto the stack.
4 "Multiply" (takes no arguments)
Removes the top two numbers from the stack, multiplies them and then pushes the total back onto the stack.
5 "Divide" (takes no arguments)
Removes the top two numbers from the stack, divies them and then pushes the result back onto the stack.
Consider the following examples:
0 2 0 2 2 yields the result 4
0 5 0 3 3 yields the result 2
0 10 0 10 4 yields the result 100
0 10 0 5 5 yields the result 2
0 10 0 5 4 0 2 5 yields the result 25
Please write a simulation of the Clifford Engine. Your solution should be efficient and easy to extend. Dr. Clifford is interested in exploring conditional branching instructions later in the year.
You can pick any programming language - we are looking for a solution that is clear, idiomatic, and interesting.
How can you be sure that your Clifford Engine is working as expected?
If you execute the following Clifford Code, what is the result you get expressed in hex?
0 60 0 10 3 0 180 0 3 5 4 0 4 2
Thanks
on2itonline:
Hi, KIWI Team here at on2itonline would love to work for you on this project,
we do "full service" websites on a clear and fixed budget.
We have lots of offer that others don't, like our lifetime FREE hosting on every website for a start.
We have read carefully the project description and fully understand the project requirement.
Let's discuss further issues of the project through PM
ALREADY HAVE THE PROJECT CODED, please read. Native English speaker with extensive technical experience. Degree in Comp Sci and have worked in the industry on lots of Java projects. Can get it done in a day max. I literally did a project like this for a university final. Can guarantee delivery because I already have the project coded essentially.
Respected Sir!!!!
I've read your requirements and i'm ready to work with u...
although we're new to freelancer but we've worked a lot in local markets.. so all i want is u to trust me.. and i wont let it down...
for checking our previous works u can see our company's URL that is given in PM...
Thank you sir..
I have implemented this in Java according to your request and commented the code for easy maintainance and modifications. I sent you a PM containing the answer to the question you asked.
Yours Faithfully
Hi Mamun, I've implemented the Clifford Engine in PHP. It is well commented and fits your requirements. When chosen I would be able to send it to you without delay. I would also be able to complete it in Javascript or Python if you prefer. Thanks, Justin