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
2
votes
3 answers

UInt32 array to Double array Swift

I need to multiply 2 matrices in swift, so in order to use accelerate I need 2 arrays with type double. The issue is, the two arrays that I need to multiply are type UInt32. Is there anyway to convert a UInt32 array to a double array? var…
Ethan Rappaport
  • 417
  • 1
  • 6
  • 14
2
votes
1 answer

Converting a BitArray in to UInt32 C#

im trying to convert a BitArray {0,0,0,0,0,0,0,0} into this: UInt32 0x0000 How can I do this?
Dirk
  • 13
  • 2
2
votes
2 answers

Swift: Convert Int to UInt32, and how to unwrap optional

im pretty new to swift, and im just trying to build something to test out the waters. this is in relation to a previous question i had. I am building some code to take user input from a UITextField object, and basically im trying to figure out how…
humans
  • 549
  • 8
  • 18
2
votes
2 answers

Convert bit sequence to uint32_t in c++

User specifies register (LFSR) length with integer as a parameter for a function, for example he enters number 5. I need to initialize this 5-bit length LFSR with all 1 bits (for length 5 it will be 11111) and get a seed mask in a format uint32_t -…
Illania
  • 117
  • 1
  • 1
  • 14
2
votes
2 answers

Saving byte-wise a uint_32 to a 1 by 4 array in MATLAB

I would like to save each byte of a uint_32 number to the elements of a 1x4 matrix using Matlab a = zeros(1,4,'uint8'); val = uint32(2^32-1); How can I split val byte-wise and insert each single element in the array?
UserK
  • 884
  • 3
  • 17
  • 40
2
votes
1 answer

(swift) Error: can not invoke '>' with an argument list of type '(UInt32, @lvalue UInt32)'

class ViewController: UIViewController { @IBOutlet weak var inputField: UITextField! @IBOutlet weak var output: UITextView! var guesses : UInt = 0 var number : UInt32 = 0 var gameOver = false let MAX_GUESSES : UInt = 8 …
Kocsis Kristof
  • 74
  • 2
  • 10
2
votes
2 answers

Convert uint32 address into char array

I would like to convert a uint32 to a char string for printing purposes. My uint32 is an address that looks something like "0x00402B00" I could care less about the preceding "0x", but it doesn't matter if it's in there. How can I turn this number…
user2313363
  • 21
  • 1
  • 2
2
votes
1 answer

Why does not uint16_t show the desired output?

I have an array- uint8_t arrayTest[] = { 0, 0xC1, 0, 0, 0, 0x0a, 0, 0, 0, 0x50 }; So the following printf with uint32_t shows the correct output "a": printf("%x ",ntohl(*((uint32_t…
rrsuj
  • 409
  • 6
  • 10
2
votes
1 answer

Objective-C - ulong to uint32

How can i convert an ulong to uint32? A simple cast is not working. What works for me is converting the long to a string and then again parsing the string to an int. However this seems really wrong. Is there any better way?
oipoistar
  • 477
  • 6
  • 19
2
votes
1 answer

passing a UInt32 into a NSData object returns (null)

I am trying to pass a NSNumber into a UInt32, which is working.. Then I am trying to stuff that UInt32 into a NSData object.. however this is where things get abit funky... when I try to write whats in that NSData object out to a string its…
C.Johns
  • 10,185
  • 20
  • 102
  • 156
1
vote
1 answer

how to pass NSUserDefaults integer to a UInt32 object

I am wondering if it is possible to pass an integer value I am creating in my NSUserDefaults into a UInt32 object? So far I am creating the NSUserDefaults as below. NSString * yourKey = @"RequestNumber"; NSUserDefaults * defaults =…
C.Johns
  • 10,185
  • 20
  • 102
  • 156
1
vote
2 answers

objective c counter

I want to create a counter that is remembered for the life of the application, i.e. never forgotten, unless the application is uninstalled. The counter is going to keep track of the number of requests the user makes... maybe I will look to reset it…
C.Johns
  • 10,185
  • 20
  • 102
  • 156
1
vote
0 answers

guint32 date to timestamp in php

I have a date format that is from a GTK\GNOME app that is stored in guint32 date: example: 724605 which I would like to convert into a time-stamp for use with-in a PHP script? Any ideas I have been using Google and trying to come up with a way to…
mushookies
  • 11
  • 1
1
vote
1 answer

Typescript Uint8Array, Uint16Array Python equivalent

new Uint8Array(new Uint16Array([64]).buffer) How can I achieve same result structure with pure Python? What is an equivalent of Uint8Array/Uint16Array? I'm getting buffer from Uint16Array type here and cast to Uint8Array, however I'm not sure how…
Tatarinho
  • 754
  • 2
  • 11
  • 31
1
vote
1 answer

size_t pointer vs uint32_t pointer in c

I'm having trouble working with size_t* and uint32_t* I have a program that has something like int main () { size_t out_length; . . . func_1(param_1, ..., &out_length); out_length > some_numberl; } func_1(param_1, ... , size_t…
PolarBear
  • 41
  • 7