Skip to main content

Questions tagged [machine-code]

According to Wikipedia, Machine code or machine language is a set of instructions executed directly by a computer's central processing unit (CPU). Each instruction performs a very specific task, such as a load, a jump, or an ALU operation on a unit of data in a CPU register or memory. Every program directly executed by a CPU is made up of a series of such instructions.

3 votes
1 answer
311 views

I'm writing a JIT runtime, and I've started thinking about shorter variants of some instructions. In x64 we can do at least two kinds of jumps: rel8 and rel32. The first one takes say 2 bytes (opcode +...
freakish's user avatar
  • 3,085
1 vote
3 answers
3k views

EDIT: Perhaps what I am misunderstanding is that when it is said that the code we type gets turned into machine code of 0s and 1s. If these 0s and 1s are the abstracted representation of their ...
steez's user avatar
  • 31
-4 votes
3 answers
2k views

I'm writing a compiler, and I want it to compile to a native executable (just Linux, for now). I don't want it to be Assembly, it needs to be PURE machine code. Can anyone point me in the right ...
InfiniteDonuts's user avatar
1 vote
2 answers
457 views

We know a regular computer basically only knows two states and that we name these states 0 and 1 respectively. This seems arbitrary, we could name them "a" and "b", or even 3 and 4. Is there a reason ...
Mehedi Hasan Shifat's user avatar
-2 votes
1 answer
3k views

Question: For a 16 bit word with 6 bits for an opcode How many different instructions could I fit into the instruction set? What is the largest number that I could use as data? Answer: ...
mertyildiran's user avatar
1 vote
3 answers
2k views

Typically for a single instrcution, 6 machine cycles are needed: FETCH instruction DECODE instruction EVALUATE ADDRESS fetch OPERANDS EXECUTE oepration STORE result My concern is regarding the fifth ...
AhmedWas's user avatar
  • 147
15 votes
5 answers
13k views

Does compilation that produces an interim bytecode (like with Java), rather than going "all the way" to machine code, generally involve less complexity (and thus likely take less time)?
Julian A.'s user avatar
  • 253
10 votes
1 answer
335 views

How is runtime-generated machine-code (such as the output of a JIT), actually executed by the CPU if the CPU/OS has an Execution Disable bit? As far as I know, many modern processors and Operating ...
Siler's user avatar
  • 421

15 30 50 per page