Thanks for your efforts. However, while you are describing the modulus operator, I am still trying to figure out how the bitwise & is supposed to work out in this thing. I am not a young person, this stuff is quite new to me, I will keep reading and maybe it will make sense.
Appreciate your assistance though....
User Profile
Collapse
-
OK, this is what I have so far.... I am lost.
#include <stdio.h>
int main ()
{
int i, count, mask;
mask=0x8000;
i=0x1b53;
printf("Hex value = %d, Binary = %d\n", i, mask);
for (i = 0; i <= 15; i = i + 1)
printf("1");
printf("0");
return 0;
}...Leave a comment:
-
Well, maybe the hint is enough for a person familiar with programing...
I have never taken any programming classes. We are in our 4th week of C.
Well, thanks for the quick reply....Leave a comment:
-
Writing a program to print out the binary value of a 16 bit number
Hello;
I am a newbie.
A homework assignment was assigned and I am having trouble getting started.
The assignment reads:
Write a program to print out the binary value of a 16 bit number.
Create integers i, count, and mask.
Set 'i' to a hex value of 0x1b53.
Set mask to a value of 0x8000. Why?
print a line to show the hex value of i and then the...
No activity results to display
Show More
Leave a comment: