Yes, that's why compiled code is sometimes called a binary.Originally posted by: bwanaaa
Consider if i gave you a string of 0s and 1s,
1) is there a way to design a machine that could make sense of that string as executable code
2) is the resulting machine design unique or are there infinite possibilities?
Originally posted by: bwanaaa
Consider if i gave you a string of 0s and 1s,
1) is there a way to design a machine that could make sense of that string as executable code
2) is the resulting machine design unique or are there infinite possibilities?
Heh, you sort of contradicted yourself thereOriginally posted by: blahblah99
Infinite possibilities. If your string is N bits long, then there are 2^N possibilities.
Originally posted by: bwanaaa
I didnt express myself clearly. If I generated a random string of 0s and 1s, is it possible to design a machine that will accept that random sequence as a valid set of instructions that execute. To make it even harder, that the code should execute something useful.
See previousCan such a virtual machine be simulated in software?
Why would anyone want to interpret randomness? You'd never know what you'd get out, and the VERY vast majority of the time, you'd get nothing. Just for kicks, try running some random numbers through your x86 chip - a LOT of combinations make for valid instructions. You'll see how pointless it isIs there a program that can be written to generate said virtual machine?
It's called a 65C816 (used in Apple //gs & Super Nintendo). 8 bit opcodes with all 256 possibliities used up with valid instructions.Originally posted by: bwanaaa
I didnt express myself clearly. If I generated a random string of 0s and 1s, is it possible to design a machine that will accept that random sequence as a valid set of instructions that execute.
"useful" is a matter of opinion.To make it even harder, that the code should execute something useful.
Can such a virtual machine be simulated in software?
Is there a program that can be written to generate said virtual machine?
Originally posted by: bwanaaa
I am not referring to compilation/decompilation. That is the translation of high level code to low level code and vice versa. Rather I am considering the code itself. Consider the following : For example, what is the binary representation of the NOP command? Now why is it that? Could the function of the NOP command be represented by a different binary string?
Originally posted by: bwanaaa
I am not referring to compilation/decompilation. That is the translation of high level code to low level code and vice versa. Rather I am considering the code itself. Consider the following : For example, what is the binary representation of the NOP command? Now why is it that? Could the function of the NOP command be represented by a different binary string?
Originally posted by: bwanaaa
thank you almost all of you for your patient replies. yes 'genetic algorithms' is the word pair that took me in the direction i was looking to go (google is a wonderful thing)
uart,
stick your finger in your ear and spell the abbreviation for mountain out loud