Tag Archives: Binary

An Assembly program to conduct a binary search on a given sorted array of 16-bit, unsigned integers, and a given 16-bit unsigned key

Now we will write another Assembly program to conduct a binary search on a given sorted array of 16-bit, unsigned integers, and a given 16-bit unsigned key.   The above Logic is a C like Program to conduct a binary search we need small Algorithm Shown above in a very simple way, So Just we will covert… Read More »

An Assembly program which should convert 4 digits BCD number into its binary equivalent

Now we will write another Assembly which should convert 4 digits BCD number into its binary equivalent. Let’s identify variables needed for this program. First variables will be the one which will hold the value present in the variable BCD to be converted and TEMP will hold the converted Hexadecimal equivalent and then to print its Binary… Read More »

ASSEMBLY29 An Assembly program using the method of “add-and-shift” loop, in which you use the binary digits of one number to control additions of a shifted version of the other number into a running total; this is essentially the same algorithm you use when multiplying numbers by hand in decimal

Now we will write another Assembly program, Using the method of “add-and-shift” loop, in which you use the binary digits of one number to control additions of a shifted version of the other number into a running total; this is essentially the same algorithm you use when multiplying numbers by hand in decimal Let’s identify variables… Read More »

An assembly program to accept a decimal number and print it’s 2’s complement binary and hexadecimal – IGNOU MCA Assignment 2013

MASTER OF COMPUTER APPLICATIONS Course Code : MCSL-017 Course Title : C and Assembly Language Programming Assignment Number : MCA(1)/L017/Assign/2013    Write an assembly language program to accept a decimal number and display it’s two’s complement representation in binary and hexadecimal formats   DATA SEGMENT     DIGIT1 DB ?     DIGIT2 DB ?     HEXNUM DB… Read More »

An Assembly Language program to convert packed BCD to equivalent binary – IGNOU MCA Assignment 2013

BACHELOR  OF COMPUTER APPLICATIONS Course Code : BCSL-022 Course Title : Assembly Language Programming Lab Assignment Number : BCA(II)/BCSL022/Assign/13   Write and run an assembly language program that converts a packed two digit BCD number in AL register to equivalent binary number. The binary number is stored in the AH register   DATA SEGMENT      PACKEDBCD… Read More »

A near procedure assembly Language program to convert ASCII to binary – IGNOU MCA Assignment 2013

BACHELOR  OF COMPUTER APPLICATIONS Course Code : BCSL-022 Course Title : Assembly Language Programming Lab Assignment Number : BCA(II)/BCSL022/Assign/13   Write and run (using appropriate calling program) a near procedure in assembly language that converts an ASCII digit passed to it on AL register to equivalent binary value. The value is returned back on the AL… Read More »

ASSEMBLY27 An Assembly program for adding an array of Binary Digits

Now we will write another Assembly program for finding the largest number in array of 10 elements. First variables will be the one which will hold the value discovered as the Sum of All the Binary Digits in Array list and it will be RES and Second will be the one which will hold the values present in the Given… Read More »

A C program to covert decimal to binary, octal & Hexadecimal – IGNOU MCA Assignment 2013

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/13 Assignment 2013   A C program that takes a decimal number and converts it into binary, octal and hexadecimal equivalents. Your program should have functions for each type of conversion. These functions should implement algorithms to… Read More »

A C Program to convert Binary to Octal number – IGNOU MCA Assignment 2013

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/13 Assignment 2013    An interactive C program to convert a binary number to its octal equivalent.   #include<stdio.h> void main() { char S[15]; int I,Y,LIMIT,LEN,OCT[15],BIN[15],RESULT,FLAG=0; clrscr(); printf(“ENTER BINARY NUMBER TO BE CONVERTED : \n”); scanf(“%s”,&S); LEN=strlen(S);… Read More »