Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[General] How to efficiently convert 8 bit data into 64 bit data

Status
Not open for further replies.

sundar11

Member level 1
Member level 1
Joined
Apr 16, 2014
Messages
41
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Visit site
Activity points
272
Hi everyone
In my MCU i need to convert a 8 bit hex value into 32 bit value. How can i do this, i tried some logic but it converts only 8 bit value into 16bit value. Any ideas regarding this would be helpful.

Thanks in advance

regards

sundar
 

think we need more information - what do you mean by hex value?
e.g. is the data stored in a byte and you wish to store it in 32 bits? assuming long int is 32 bits something along the lines of should work
Code:
signed char data=10;
long int x;
x=data;
 

storing a 64 bit value in a variable is the idea, but unsigned long long int does not support it. it takes only upto 32 bit only.
 

storing a 64 bit value in a variable is the idea, but unsigned long long int does not support it. it takes only upto 32 bit only.

if you do a web search for "large integer math library" it will give you a number of links, e.g. the GNU Bignum library
https://gmplib.org/
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top