Memory representation of unsigned
char: In
unsigned char all 8 bit is used as data bit
Memory representation of unsigned char a= 7;
Binary equivalent of 7
is: 111
Here MSD stand for most
significant digit and LSD list significant digit.
Memory representation of signed
char:
1 bit: signed bit
7 bit: data bit
Note: In C, negative number is stored in the 2’s complement format.
Signed bit is 0: Number is positive.
Signed bit is 1: Number is negative.
Memory representation of char a=7;
Binary equivalent of 7
is: 111
For 8 bit we will add 5 zero in the left side i.e. 00000111. Memory representation:
Memory representation of char a=-7;
Binary equivalent of 7 is 111
For 8 bit we will add 5 zero in the left side i.e. 00000111. Since a is negative number so it will store in the memory in the 2’s complement format
1’s complement of a:
11111000
+ 1
____________
2’s complement of a:
11111001
Memory representation:
23 comments:
Very Good Explanation. Thank you.
thanks a lot
Thanks u very much...
gr888 work
good one :)
Really, very good explanation.....
nicely explained...thanks a lot...
i understood very clearly..thanks a lot
really good explanation
good explaines.. thanks...
Thank U Very Much Sir.......
very good site, helping me a lot, thank you very much.
that's what i m finding for,thanks a lot brother
fantastic explanation thnks....
I understand.
But if you can give me a vedio.
How to say Thanks I don't know . Wonderful...
I appreciate your work but sorry to say where is the representation of integer data type and m not gtng ur explanation pls reply ADMIN.............. its a kind request ............ pls.......... if possible reply................
I appreciate your work but sorry to say where is the representation of integer data type and m not gtng ur explanation pls reply ADMIN.............. its a kind request ............ pls.......... if possible reply................
good one!!!thanx a lot...
Very Nice :)
vry gooooooo
thank you very much
Really,This is best site for improving c language....
Post a Comment