Skip to main content

Machine Code Definition




Machine code, also called machine language, is a computer language that is directly understandable by a computer's CPU (central processing unit), and it is the language into which all programs must be converted before they can be run. Each CPU type has its own machine language, although they are basically fairly similar.
After the source code for a program has been written by one or more humans in a programming language (e.g., C or C++), it is compiled (i.e., converted) into machine code by a specialized program called a compiler, or by an assembler in the case of assembly language. This machine code is then stored as an executable file (i.e., a ready-to-run program) and can be executed (i.e., run) by the operating system any time it is instructed to do so by another program or by a user.
Machine code is extremely difficult for humans to read because it consists merely of patterns of bits (i.e., zeros and ones). Thus, programmers who want to work at the machine code level instead usually use assembly language, which is a human-readable notation for the machine language in which the instructions represented by patterns of zeros and ones are replaced with alphanumeric symbols (called mnemonics) in order to make it easier to remember and work with them (including reducing the chances of making errors). In contrast to high-level languages (e.g., C, C++, Java, Perl and Python), there is a nearly one to one correspondence between a simple assembly language and its corresponding machine language.
Programs for the first electronic computers were written directly in machine code. However, the development of assembly language from the 1950s led to a large increase in programmer productivity. Initially, programs written in assembly language programs were hand-translated into machine code, but this tedious task was later eliminated by the development of assemblers to automate the translations.

Comments

Popular posts from this blog

Computer Buses

Computer Buses   A computer system consists of different devices.CPU must be able to communicate with all devices. The devices are connected together by a communications channel called bus. A bus consists of a set of communication lines or wires. It is used to move a large amount of bits in the form of electrical pulses from one unit to another. The bus is used to connect the following units: Central Processing Unit Control Unit  Arithmetic and Logic Unit Main Memory ( RAM, ROM) Input / Output Devices Bus is a common path to transfer data and commands between CPU, memory and input / output devices.It is also used to send or receive data from secondary storage.The capacity of a bus depends on the number of data lines in it.A bus with 16 lines can carry 16 bits or 2 bytes at a time. A bus with 32 lines can carry 32 bits or 4 bytes at a time . Types Of  Buses Different types of buses are as follows: 1. Data Bus 2.Addres...

Steps to remove google accounts from Computer

Open Google . You will see a round shaped picture of google account picture in top right corner as marked in below picture Click on it. Click on sign out of all accounts Click on Sign In at the top right corner as shown in picture below. Click on it. You will see following screen. Select your desired account from it and sign in . Reopen your form by clicking link provided to you, It will be open now.

Introduction to Object Oriented Programming ( OOP )

Object-Oriented Programming Object Oriented programming is a programing model that is based upon data and object. Classes   Classes are the blueprint of objects. Now you will think about what actually blueprints are. Blueprints are actually a design or plan to build something. Let's take an example like the map is detail plan of house classes are detail plan in  Object-Oriented programming. let's give you an example of a class on java so that you can unferstand. public class Car {          int horsePower;     String name;     String color;      String Company; } public class Sample {     public static void main(String[] args) {         Car car;         Car mehran;             } } Class name always start with capital letters . It is a good practice to name classes .  We will later learn how this is good. So in the above class Car ...