C Programming: Lab Assignments: ASSIGNMENT 10: Bitwise Operators
This document outlines 6 assignments involving bitwise operators in C programming. The assignments include writing functions to count 1 bits in a number, display a number in binary format, check even parity and modify if needed, perform bitwise XOR on alphabet characters, and swap two numbers using XOR. The assignments are intended to help students learn and practice various bitwise operations in C.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
77 views
C Programming: Lab Assignments: ASSIGNMENT 10: Bitwise Operators
This document outlines 6 assignments involving bitwise operators in C programming. The assignments include writing functions to count 1 bits in a number, display a number in binary format, check even parity and modify if needed, perform bitwise XOR on alphabet characters, and swap two numbers using XOR. The assignments are intended to help students learn and practice various bitwise operations in C.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
C Programming : Lab Assignments
ASSIGNMENT 10: Bitwise Operators
1. Write a function to count number of 1 bits into a given number. 2. Write a function to display given number in binary format. 3. Modify above program to accept number as command line arguments. 4. Write a function to check whether a given byte has even parity. If not set MSB bit to make it even parity. 5. Write a function to check whether given character is alphabet or not. If it is alphabet, perform its bitwise XOR operation with value 32 and observe the result. 6. Write a function to swap two numbers using XOR operation.