Memory representation of signed char in c

(2)Memory representation of: signed char a=-7;

Binary equivalent of data 7 in eight bit:  00000111
Binary equivalent of data -7 will be its 2’s complement:
1’s complements of 0000 0111 is 1111 1000
2’s complement will be:




Binary equivalent of data -7 in eight bit:  1111 1001
Data bit: 1111001 (Take first seven bit form right side)
Sign bit: 1       (Take leftmost one bit)

In memory




Introduction
List of data types
Primitive data types in c
Modifiers of data types in c
List of modifiers in c
Default modifiers of data types in c
Default data of modifiers in c
Rules of using modifiers in c
Possibles modifiers of given data types in c
Size modifier in c
Size of data types in c
Sign modifier in c
Range of data types in c
Easy way to remember limit of data types in c
Const modifiers in c
Pointers modifier in c
Function modifier in c
Interrupt modifier in c
Volatile modifier in c
Fundamental data types in c
Memory representation of char in c
Memory representation of signed char in c
Memory representation of int in c
Memory representation of signed int in c
Memory representation of double in c

2 comments:

Unknown said...

what will be the representation in 16 nit ???

vicky raj said...

what's the mean of sign bit and data bit please anybody explain?