3,611 questions
Score of -1
1 answer
93 views
"OSError: [WinError 193] %1 is not a valid Win32 application" for a dll library
I'm trying to run this code to connect to a numerical picoscope, and then run a bigger code :
import os
import platform
import ctypes
dll_dir = "C:\Program Files (x86)\Pico Technology\PicoScope6&...
Score of 4
1 answer
126 views
Cortex-M33 Exclusive Monitors: Behavior of LDREX/STREX on Internal SRAM vs. Peripherals for Atomic RMW
I am working on an ARM Cortex-M33 device and implementing a custom atomic Read-Modify-Write (RMW) bit manipulation routine without native bit-banding support.
When compiling my code with optimization ...
Score of 6
1 answer
187 views
How do you test a bitfield in Assembly?
I am writing some tests for VBE resolution using x86_16 assembly. I need to test a bitfield for some attribute flags, but I'm not sure of the best way to do so. The solution I currently have is this, ...
Score of 2
2 answers
182 views
Simple C malloc question that prints garbage on multiple invocations [closed]
I'm refreshing my C skills (been decades) and ran across something I don't quite understand. I'm working on some code that involves a lot of bit shifting, masking, etc. I have one function that ...
Score of -1
1 answer
55 views
Back to the bit test question in JavaScript
Given:
all numbers are valid BigInts for expanding to 128 bits and beyond
buttonArray holds 64 button objects
a button is initalized through a .forEach loop and pushed onto buttonArray
this makes ...
Score of -4
2 answers
173 views
Is there a name for the high and low bits of a hex string?
In the hex byte A1 B2 C3 D4, ABCD would be the most significant bits of each pair, and 1234 would be the least significant. I find that these groups of bits are often operated on together in hardware-...
Score of 0
1 answer
180 views
DB2 LUW What's up with BINARY vs. CHAR FOR BIT DATA column data types?
We have DB2 LUW v11.5 and it supports both BINARY and CHAR FOR BIT DATA column data types. I've read the documentation, and I've Googled it, but I don't really see an effective difference between ...
Score of -3
1 answer
80 views
I can't find the error in this code. It is x86 assembly
Input: unsigned char vet[] = { 0xBC,0xFF,0x01 };unsigned short int len = 18;
Output: short int minLung;short int maxLung;
Given a sequence of bits, determine the minimum and maximum length of ...
Score of 0
1 answer
88 views
bit manipulation for big data processing with complex boolean logic
Looking into solving a very large data set problem by using bit manipulation to reduce compute
Imagine billions of records that look like this(but more than 20k in length):
Questions : A,B,C,D
...
Score of 1
1 answer
93 views
Grouping bits based on binary mask [duplicate]
I am looking for an algorithm to group bits from byte A based on mask (or tap) from B, on byte C, starting from least-significant. By way of example, the mask/tap (B) has bits 1,3,4 set to 1, which ...
Score of 1
3 answers
206 views
Powershell converting bit values to Boolean in result set
I have an issue whereby a query called via Invoke-SQLCmd returns a certain set of results. For some columns the value is a 0 or 1 of BIT data type. The results instead come back as False or True in ...
Score of 0
1 answer
107 views
How much data uses an especific function [closed]
How can I determine the exact amount of memory in megabytes that a "char" data type uses, beyond just knowing its size in bytes, nibbles, kilobytes, and bits?
I’ve tried using sizeof and ...
Score of 3
1 answer
114 views
question at / pivot and >> 2 in C++ Solution for Next Higher Number
I came across the following C++ solution for finding the smallest number greater than n that has the same number of 1's in its binary representation
int solution(int n) {
int pivot = n & -n;
...
Score of -3
1 answer
372 views
typescript number type with bit operations [duplicate]
in typescript, as the number type can be int or float, so what if I use number type with bit operations
I have see some library use this
const a = 1.23
const b = a | 0
Sorry for the inaccurate ...
Score of 0
2 answers
119 views
How does bitshifting 0xFF to the end of an Uint32 form a complete hexadecimal code?
I've been following along to Cave of Programming's C++ for Complete Beginners on Udemy, and in lesson 67 he goes over bitshifting to output certain colour pixels in an SDL window. There's a certain ...