# Questions tagged [binary]

The tag has no usage guidance.

117 questions
Filter by
Sorted by
Tagged with
94 views

### Mathematica LinearSolve with additional constraints

I want to solve a linear Matrix equation over GF(2). I am currently using Mathematica's LinearSolve[A,B, Modulus->2] function to solve for X in the equation AX = ...
• 23
121 views

### how to convert a decimal fractional number to binary with given number of digits after the binary point?

Given 0.4, the binary form is 0.0110011001(with 10 digits after ".") and 0.011001100110011001100110(with 24 digits after ".") without rounding. Is there any function that can do ...
• 941
1 vote
61 views

• 23
1 vote
80 views

### FindMaximum under binary constrains

I'm trying to find a maximum for a function whose variables have binary values (either -1 or 1). The clumsy code for that constraint I use is shown below. There must be a more compact code, and I ...
• 11
46 views

### Table Glitch / Error with binary data

I have a large group of binary files that I am loading with binaryList = Table[ BinaryReadList[ paths[[i]], "Byte"], {i, Length@paths}]; specifically ...
• 180
1 vote
414 views

### Import OVF 2.0 Vector field files

I'm using a simulation software (mumax3) which outputs OVF_2.0 files. It can either export binary or text files. The binary files are usually much smaller than the text files. I would like to use the ...
3k views

### Find if there are consecutive 1s in a binary representation of a number

Given a list of numbers in decimal form, what is the most efficient way to determine if there are any consecutive 1s in the binary forms of those numbers? My solution so far: ...
• 831
1 vote
250 views

### Construct a binary tree where nodes are labeled according to given rule

I want to plot a binary tree in Mathematica where the nodes are labeled according to a given rule. In fact, whether a node has a left child or a right child or both, will be determined by a rule. And ...
1 vote
101 views

### How to understand and use bit operation for programming

I got the following code using bit operation from here: ...
142 views

### Importing a 12 bit array

I have a binary file of 12 bits integers obtained from a camera software. It can produce FITS files from these but the processing time on the large data set I have is excessive. What I have is the ...
• 159
177 views

### How to recover plaintext from .MX files?

I need a function to deserialize the contents of an MX source file for reading. We can’t simply use Get because I don’t want to load or run the code, but rather to ...
• 3,735
485 views

### Why does Mathematica consume so much memory when reading binary data?

There are somewhat similar questions on here, but I didn't find a satisfying answer for this case: I import a 1.7 GB binary data file using the following command: ...
• 728