bit length of unsigned word

Technical questions regarding the XTC tools and programming with XMOS.
jagspaul
Experienced Member
Posts: 117
Joined: Tue Oct 18, 2011 3:28 pm

bit length of unsigned word

Post by jagspaul »

what is the bit length of unsigned word in xc.

jags


jagspaul
Experienced Member
Posts: 117
Joined: Tue Oct 18, 2011 3:28 pm

Post by jagspaul »

I think it is same as unsigned int i.e. 4 bytes.
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Code: Select all

unsigned int a;
unsigned b;
Both are equal.. and 32-bit on the XMOS platform with the XMOS tools.

See https://www.xcore.com/forum/viewtopic.php?f=10&t=1543
jagspaul
Experienced Member
Posts: 117
Joined: Tue Oct 18, 2011 3:28 pm

Post by jagspaul »

my question is "unsigned word"
not
"unsigned"

jags
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

There is no "unsigned word" in the XC language.

A word is typically a number of bits that form a group and are processed/belong together.
If not specified you can assume that a word is 32-bit on XMOS.

Do you have a context or example?

Oh and I deleted your thread with the "." as title and no content.
User avatar
kean
Member++
Posts: 19
Joined: Tue Sep 27, 2011 11:49 am

Post by kean »

For all the other valid types you can find here the respective sizes.