Practice Programs - ARM 7
Practice Programs - ARM 7
1. Write an ALP to multiply two 16-bit binary numbers using successive addition.
2. Write an ALP to find the sum of first ten 32-bit numbers and sum may be more than 32-bit.
3. Write an ALP to find factorial of 16-bit number.
4. Write an ALP to add an array of 16-bit numbers and store the result (may be greater than 16-bit) in
an internal RAM.
5. Write an ALP to add two 64-bit numbers.
6. Write an ALP to find the square of a number (1 to 10) using look-up table.
7. Write an ALP to find the smallest number in an array of 32-bit numbers.
8. Write an ALP to find the largest number in an array of 32-bit numbers.
9. Write an ALP to arrange a series of 32-bit numbers in descending order.
10. Write an ALP to arrange a series of 32-bit numbers in ascending order.
11. Write an ALP to count the number of ones and zeros in a 32-bit numbers stored in the consecutive
memory locations.
12. Write an ALP to scan a series of 32-bit numbers to find how many are negative.
13. Write an ALP program for find the GCD of two 8-bit numbers.
14. Write an ALP program for find the LCM of two 8-bit numbers.
15. Write an ALP to transfer a block of data consisting of N 16-bit numbers from source block to
destination block.
16. Write an ALP to exchange 16-bit numbers in a block with a data’s in another block.
17. Write an ALP to search a 32-bit number(0x1234) in given array, if found display store 0xFFFFFFFF
in R0 otherwise 0x00000000
18. Write an ALP to find the length of a string. The string is terminated by 0x0D.
19. Write an ALP to convert uppercase letters to lower case letters.
20. Write an ALP to add first 5 natural numbers. Store sum in memory location.
21. Write an ALP to add first 10 odd numbers. Store sum in memory location.
22. Write an ALP to compute sum of squares of 5 numbers starting from ‘I’.
23. ALP to add the first N even numbers. Store the result in a memory location.
24. Write an ALP to find the average of ten 16-bit numbers stored in memory.
25. Write an ALP to generate the first n Fibonacci numbers.
26. Write an ALP to find the sum of digits of a number 32-bit number.
27. Write an ALP to convert 4-digit BCD number to Hex.
28. Write an ALP to convert 4-digit Hex number to BCD number.
29. Write an ALP to convert 32-bit grey number to its equivalent binary.
30. Write an ALP to convert 32-bit binary number to grey code
31. Write an ALP to convert 4-digit hex number into its ASCII equivalent.
32. Write an ALP to check whether the given 32-bit number is bitwise palindrome or not. If it is
palindrome store 0x11111111 in memory location otherwise 0xFFFFFFFF.
33. Write an ALP to check whether the given string of length N is palindrome or not. If it is palindrome
store 0x11111111 in memory location otherwise 0xFFFFFFFF.
34. Write an ALP to count number of times the letter “A” present in a given string.
35. Write an ALP to reverse a string of length N characters.
36. Write an ALP to check whether the given substring present in a main string or not. If it is present,
store 0x11111111 in memory location otherwise 0xFFFFFFFF.
Hints: Main string: CONTAMINATION Sub string: NATION
37. Write an ALP to perform the following operations on a 32-bit number.
i. Mask bits from 0-7
ii. Invert bits from 8-15
iii. Make logic ‘1’ from bits 16-23
38. Write an ALP to check whether the given 8-bit number is prime or not. If it is prime, store
0x11111111 in memory location otherwise 0xFFFFFFFF.
39. Write an ALP to separate ODD and EVEN numbers in a given array of 32-bit numbers.
40. Write an ALP to separate positive and negative numbers in a given array of 32-bit numbers.