3 ms·
I have an anecdote. Back then when I was studying CS on the exam for computer architecture class, we got a problem to solve: "Define the instruction set for you
by hzlatar 5y ago
I have an anecdote. Back then when I was studying CS on the exam for computer architecture class, we got a problem to solve: "Define the instruction set for your imaginary CPU and then use it to write a program for managing an elevator."
They expected us to imagine a simple instruction set with 7-10 commands. But one clever guy wrote this: "My CPU has only one instruction - manage_elevator. The code for elevator management is: "manage_elevator". He passed with A.
I guess that is how a non-programmer would imagine a programming language.
- Jtsummers 5y agoOr an engineer. I briefly worked with a team doing radar systems, their CPU basically had every mathematical function you could want available as an assembly instruction. Want to work with complex numbers? It's in the instruction set. Want to convert between coordinate representations? It's in the instruction set.