I have the following code
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <stdint.h>
using namespace std;
int main(){
int x;
cin>>x;
uint32_t Ex;
Ex=(x<<1)>>24;
cout<<Ex<<endl;
return 0;
}
but does it give 0 for any value of x?
My task is as follows:
Computation of the biased exponent Ex of a binary32 datum x.
source
share