computers understand nothing but one and zero. But I want to know more about how the source code or instruction set is converted to 1 and 0. If the exe file contains only 1 and 0?
Each type of operation in the instruction set is defined by an operation code, which is represented as a pattern 1s and 0s. A compiler or interpreter translates the code into the source language machine code composed of these instructions.
For example, take this code where the variable is set xto 50:
x
x = 50;
, AX ( x) 50 ( ), MOV :
mov ax, 0x32
MOV 0xA0, AX 0xB, :
MOV
10100000 00001011 00110010
. A.exe , 0 1 ( )
, SUM, MOV .. , CPU. - 2 + 3 -, CPU (SUM ..).
2 + 3
, , , 2 + 3, ( ).
, Assembly, . .
Each high-level instruction (in your programming language) is associated with Assembly instructions. These Assembly instructions can be highly optimized (hence, GCC and other compilers, optimization flags).
You might want to read http://computer.howstuffworks.com/bytes.htm
Source: https://habr.com/ru/post/1762629/More articles:return matches from an unknown number of python lists - pythonnsis when restarting Windows-7 to install .NET 4 installation does not continue - windows-7Can a reflector reconstruct a C ++ / CLI application - .netjQuery odd behavior of folding / moving panels with drag and drop into them - jqueryRails 3 is missing and there is currently no online documentation for 2.3.x - ruby-on-railsEncapsulating boost :: random for ease of use to replace rand () - c ++Google App Engine with JRuby - can anyone provide an overview of appengine-jruby, warble, etc.? - ruby | fooobar.comFirefox addon: how to fire an event when a page loads * starts *? - javascriptreflection iterator - iteratorApply operations in a one-dimensional array of instances on a single line using LINQ - genericsAll Articles