#include <stdio.h>
int main(){
	float a, ca;
	unsigned int *b, i;
	unsigned short int n[32];
	printf("Insert floating point number: ");
	scanf("%f",&a);
	ca=a;
	b=&a;
	printf("Representation of the number:\n");
	for(i=0; i<32; i++){
		n[i]=*b%2;
		*b=*b>>1;
	}
	b=&ca;
	*b=(*b>>23)&0xFF;
	for(i=0; i<32; i++){
		if (i==0)
			printf("sign: ");
		else if (i==1)
			printf("\nexponent: ");
		else if (i==9)
			printf("-01111111 => 2^%d\nmantissa: 1.", *b-127);
		printf("%d", n[31-i]);
	}
	printf("\n");
}
