Jump to content

In simpler form, what does this mean?


cyberproxy

Recommended Posts

"An individual machine code is called a machine instruction." What does "individual machine" code mean, what does that do? Please don't give me links, I came on a forum for answers, I can find my own links. Thanks!

Link to comment
Share on other sites

In this case "an individual machine instruction" is simply one instruction that the computer can understand. It could be, for example, to add a number to another, or move a value from one place in the memory to another.

Link to comment
Share on other sites

"An individual machine code is called a machine instruction." What does "individual machine" code mean, what does that do? Please don't give me links, I came on a forum for answers, I can find my own links. Thanks!

 

... and so, a machine instruction might be to "branch always" to a specified address (that is, continue executing code at the address given after the instruction). Other instructions (shown here in assembly language) may include BRN (branch if accumulator is negative), INC (increment accumulator, ie A=A+1), DEC (decrement accumulator, ie A=A–1), STO (store accumulator, ie in the address that follows), STP (stop, ie stop program execution), etc.

 

The "branch always" instruction is the only machine code I remember from programming in machine code many years ago. For this computer, its "branch always" instruction was 57178 in machine code (and BRA in its assembly language). It was a 24-bit octal machine, where each octal digit was represented by three bits, of course, and 57178 meant "branch always". It would appear as the first half of the machine's 24-bit byte/word, and the address to branch to was contained in the second half of the byte/word.

 

Wikipedia's article on machine code says that programming in machine code is tedious, and it certainly is. Not only that, but we programmed the computer using a bank of 24 toggle switches, one for each bit in the byte/word, and another bank of 24 toggle switches to designate the address where to store each byte/word. So, we would input 57178 as 101,111,001,1112 (a "1" was toggle switch up, and a "0" was toggle switch down) followed by the 12-bit address to branch to, also in binary. Tedious indeed.

Edited by ewmon
Link to comment
Share on other sites

The "machine code" is dependent on the CPU's architecture, ARM..MIPS..etc, there are 2 main assemblers used which are IBM and intel i *think*, its been a while tongue.png and what it does is reference to a library of binary commands... i.e hardwired commands, PUSH, POP, MOVE.......

Edited by DevilSolution
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.