Abstract
Chapter 11 presents the use of bitwise operations and control structures needed to program in the C and ARM assembly languages. Bitwise operations include bitwise AND, OR, Exclusive OR, NOT, bit set, bit clear, shift left, and shift right. Control structures covered are If-Then, If-Then Else, For loops, While loops, and Switch cases.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Problems
Problems
-
1.
It recommended that student run all examples both in C and Assembly.
-
2.
Write a program to set bit position 15 in C and assembly.
-
3.
Write a program to set bit passion b5b4 to 11.
-
4.
Write a program to clear position 15 in C and assembly.
-
5.
Write a program to shift right contents of register 8 times in C and Assembly, assume register holds 0x400.
-
6.
Write a program to shift left contents register 8 times in C and Assembly, assume register holds 0x4.
-
7.
Write a program in C and assembly to find the largest number of following data.
-
0x2, 0x5, 0x45, 0x24.
-
-
8.
Write a switch statement to convert decimal number to ASCII using C and assembly.
-
9.
Write a program two swap high digit with low digit of 0x45 using C and Assembly.
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this chapter
Cite this chapter
Elahi, A. (2022). Bitwise and Control Structures Used for Programming with C and ARM Assembly Language. In: Computer Systems. Springer, Cham. https://doi.org/10.1007/978-3-030-93449-1_11
Download citation
DOI: https://doi.org/10.1007/978-3-030-93449-1_11
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-93448-4
Online ISBN: 978-3-030-93449-1
eBook Packages: EngineeringEngineering (R0)