Questions tagged [uint32]

uint32 is a datatype that represents an unsigned integer and is coded on 32 bits in memory.

uint32 is a datatype that represents an and is coded on 32 bits in memory. Unlike its counterpart which is , uint32 can only be used to store positive integers, of values between 0 and 232 - 1.

176 questions
-1
votes
3 answers

Converting integer to binary shows different outputs when number is declared as uint32 and uint64

I was trying to convert an integer into its equivalent binary representation. I was using the following algorithm void decimal_to_binary(uint32_t number) { char bitset[32]; for(uint32_t i=0; i<32; ++i) { if((number & (1 << i)) !=…
rgk
  • 858
  • 16
  • 28
-1
votes
2 answers

Convert uint32 to const char* C++

I have a function that takes in const char* as argument, but the data I have is Datum(PostgreSQL), which I am converting to Uint32 using DatumGetUint32() function. I now need to convert it to const char* in C++. I have looked up online, many…
student001
  • 533
  • 1
  • 7
  • 20
-1
votes
2 answers

How to iterate over an Array/List/IEnumerable the full range of UInt32 in Random order?

I've tried several ways, but haven't found what I need. My goal: run a function with each possible value of an UInt32 and record the result. The order of uints shouldn't matter, but I would prefer non-sequential. Any ideas? These are some that I…
Protiguous
  • 89
  • 2
  • 9
-1
votes
1 answer

Generating the correct NSData object from byte stream

I want to transmit data in bytes and at receiver side want to generate the same NSData object back. My data size can keep on changing. I am able to define the correct length to be used on receiver side to generate the same object back. NSDictionary…
Abhinav
  • 37,684
  • 43
  • 191
  • 309
-1
votes
3 answers

How to uint32 to unsigned char array

I have 8 uint32 elements and i want to break each uint32 into 4 uint8 then add all uint8 beside each others as unsigned chars in the array , how can i do that ?
Omar shaaban
  • 257
  • 3
  • 19
-1
votes
1 answer

textField Input String convert into UINT32

need a little bit help. How I could save a Number from a textfield into a NSInteger variable? I got this propertys: @property(weak, nonatomic) IBOutlet UITextField *textFieldPort; @property NSInteger *portTemp; And I want something like…
shizophren
  • 21
  • 7
-2
votes
0 answers

Sign conversion error with std::uint32_t and std::uint8_t

I have a piece of code which assigns an 8-bit unsigned int (std::uint8_t) to a 32-bit unsigned int (std::uint32_t): std::uint32_t a{0}; std::uint8_t b{1}; a = b << 16; When I try to compile this with -Werror -Wsign-conversion -fsanitize=undefined,…
jjcasmar
  • 1,387
  • 1
  • 18
  • 30
-2
votes
1 answer

Image processing advise - converting uint32 array to Image

I'm just learning about image processing, and have chosen go as my preferred language to begin working with images. I have an array of uint32 values, such as: [[287 277 283 297 295 279 279 292 305 295 285 282 290 297 293 290 285 282 279 282 297 300…
Micheal J. Roberts
  • 3,735
  • 4
  • 37
  • 76
-2
votes
1 answer

Encode and combine int to 32bit int in C binary file

Lets say I have 2 variables: int var1 = 1; //1 byte int var2 = 2; //1 byte I want to combine these and encode as a 32bit unsigned integer (uint32_t). By combining them, it would be 2 bytes. I'd then fill the remaining space with 2 bytes of 0…
Alex
  • 49
  • 7
-2
votes
2 answers

Value of type '1-dimensional array of Integer' cannot be converted to 'UInteger'. VB.NET

Pretty simple code no idea why it doesn't work obviously UInteger aka UInt32 can hold double of what Integer can hold so it doesn't make sense why it doesn't fit, it's not even negative it's just hexadecimals. Dim xor_table As UInt32 = {&H40FC1578,…
SSpoke
  • 5,656
  • 10
  • 72
  • 124
-4
votes
1 answer

how to convert uint32 to uint64 in C?

im Converting a uint32_t hex number into uint32_t BCD number. and will do the same to uint64 hex to BCD... i have this from a uint16 uint16_t CvtBcd(uint16_t HexNumber) { return ((HexNumber/ 10) << 4) | (HexNumber% 10); } edit: I'm going to use…
Nazareth
  • 1
  • 1
  • 4
1 2 3
11
12