Closed

Algorithm Clifford Engine

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

Skills: Java, Javascript, PHP, Software Architecture, Website Design

See more: java simulation clifford engine, java clifford engine algorithm, clifford engine, whitespace programming language, what is the algorithm, what is a programming algorithm, what is an argument in programming, what is an algorithm in programming, what is an algorithm, what is algorithm in programming, what is algorithm, what is a algorithm in programming, what is a algorithm, what does algorithm, what an algorithm, what algorithm, top programming language, top java freelancers, the algorithm is, solution algorithm, push algorithm, programming and algorithm, programming algorithm examples, program algorithm, java programming examples

About the Employer:
( 0 reviews ) Dhaka, Bangladesh

Project ID: #4369013

9 freelancers are bidding on average $202 for this job

saamorim

Hi. I've completed a demo for you. See private messages, thank you.

$110 USD in 0 days
(9 Reviews)
5.6
bistanil98

Need to discuss this in detail,how we can start the discussion on this requirement. for more detail check in PM.

$412 USD in 16 days
(9 Reviews)
4.8
on2it

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 FRE More

$412 USD in 15 days
(2 Reviews)
4.2
vahid4m

i can help you,

$100 USD in 0 days
(8 Reviews)
3.7
wbslivera

Hello, I'm Oracle certified professional java programmer, and can help you. will produce result in 32 hours, Thanks

$105 USD in 1 day
(8 Reviews)
3.0
jasqwerty

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 lite More

$175 USD in 1 day
(3 Reviews)
2.4
k0der

please check my pm

$140 USD in 3 days
(7 Reviews)
2.4
aapS0ftware

Hello, This is a nice and straight forward project which requires knowledge do basic data structures to complete. I can help you on this.

$200 USD in 3 days
(2 Reviews)
1.8
nancydhiman97

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 More

$250 USD in 15 days
(0 Reviews)
0.0
streppelchen

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

$136 USD in 0 days
(0 Reviews)
0.0
Crazometer

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 More

$90 USD in 1 day
(0 Reviews)
0.0