Write a program that asks a user for a character and then displays a message whether the
parity of the character is odd or even.
For calculating the parity, instead of testing the parity flag directly, use a loop that shifts each
bit into the carry flag and accumulates a count of the number of times the carry flag was set.
For example: If the user entered an ‘A’, its ASCII value is 41h and thus, the program should
display ‘parity even’, i.e. it contain an even number of ones.

As this is homework, be sure to show your work as noted in the rules.

  • Do provide evidence of having done some work yourself if posting questions from school or work assignments
commented: Sir your Gmail I'd? +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.