







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








Machine language:
For example , an x86/IA-32 processor can execute the following binary instruction as expressed in machine language:
Binary: 10110000 01100001 (Hexadecimal: 0xb061)
Assembly Level Language:
Example (Adds 2 numbers):
name "add"
mov al, 5 ; bin=00000101b
mov bl, 10 ; hex=0ah or bin=00001010b
add bl, al ; 5 + 10 = 15 (decimal) or hex=0fh or
bin=00001111b
High-level language:
#include<stdio.h> //header files Void main() { int a, b, c; // declaration of 3 variables printf(“Enter two numbers:\n”); Scanf(“%d”, &a); // read 1 st^ number Scanf(“%d”, &b); // read 2 nd^ number c=a+b; // compute the sum printf(“Sum of 2 numbers is %d”, c); //print sum }