Skip to main content

Bitwise and Control Structures Used for Programming with C and ARM Assembly Language

  • Chapter
  • First Online:
Computer Systems
  • 933 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 49.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 64.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 89.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Problems

Problems

  1. 1.

    It recommended that student run all examples both in C and Assembly.

  2. 2.

    Write a program to set bit position 15 in C and assembly.

  3. 3.

    Write a program to set bit passion b5b4 to 11.

  4. 4.

    Write a program to clear position 15 in C and assembly.

  5. 5.

    Write a program to shift right contents of register 8 times in C and Assembly, assume register holds 0x400.

  6. 6.

    Write a program to shift left contents register 8 times in C and Assembly, assume register holds 0x4.

  7. 7.

    Write a program in C and assembly to find the largest number of following data.

    • 0x2, 0x5, 0x45, 0x24.

  8. 8.

    Write a switch statement to convert decimal number to ASCII using C and assembly.

  9. 9.

    Write a program two swap high digit with low digit of 0x45 using C and Assembly.

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics