# Questions tagged [binary]

The tag has no usage guidance.

86 questions
Filter by
Sorted by
Tagged with
265 views

### What is the relationship between the Wolfram executables? Where is this documented?

The relatively new wolframscript now accompanies the traditional math and wolfram binaries. ...
67 views

### Read binary files and separate the 64-bit unsigned integers into certain forms？

I have a binary file where each data is a 64-bit unsigned integer (little endian). For simplicity, let's say the data in testdata.bin file opened in HxD is: namely:...
88 views

### How do I get the data from this binary file? [duplicate]

I have a file which contains the following binary data: ...
117 views

### How to generate the 8^th order symmetric binary matrices whose sum of absolute eigenvalues is 8?

It is needed to generate all 8th order(8 by 8) symmetric binary matrices(of 0's and 1's) such that the sum of the absolute eigenvalues is 8. Listing all the 8th order symmetric binary matrices and ...
24 views

### FindClusters Hamming Distance giving error

I am trying to run FindClusters[hex, DistanceFunction -> HammingDistance[IntegerDigits[#, 2, 8], IntegerDigits[0, 2, 8]] &] over a list of data but I keep ...
42 views

### Import and create a hexdump view of file

How would I go about creating a hexdump type of view of an imported binary file? for example, (format is ...
42 views

### Reading product of same ByteArrays

I am handling a huge set of data and I am trying to optimize my code. I have very large expressions to expand and simplify and I've seen that converting the expressions to ByteArrays improves a lot ...
220 views

### Generating all symmetric binary matrices of order up to 7?

I want to create all symmetric binary matrix with order up to 7. Can anybody help in creating this? I want to obtain the subset of all symmetric matrices, with all diagonal entries being zero.
147 views

### Simplifying expressions containing binary variables

Consider an expression with two binary variables, $a,b\in\left\{ 0,1\right\}$, given by $F=(1-a-b)^{3}(1-b)$, with truth table: ...
47 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 ...
39 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 ...
104 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 ...
2k 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: ...
79 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 ...
80 views

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

I got the following code using bit operation from here: ...
99 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 ...
62 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 ...
453 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: ...
131 views

### Why ImportByteArray when generate image from bytes

I was trying to generate an image from a list of bytes so I only had to Import an Image once as I want to store a Base64Encoded ...
57 views

### Does NumericArray always maintain data unmodified?

Suppose that we create a NumericArray using a LibraryLink function, then pass this to another one. Is NumericArray guaranteed to maintain the binary data as it was ...
249 views

### Read NumericArray from a file

Suppose I have a binary file which consists of a list of integer or real numbers. Let's say signed 8-bit integers; so each byte of the file is a single such integer. How can I read it and turn it into ...
109 views

### Something is wrong with the implementation of the ThueMorse function

While trying to answer this Math.SE question, I believe I found several bugs in Mathematica and Alpha relating to the Thue-Morse sequence. As a quick reminder, the $n^{\rm th}$ element of the Thue-...
773 views

### BitNot does not flip bits in the way I expected

Can anyone explain why the last result in these statements is not the bit-flipped version of arr? ...
238 views

### How to import a binary data generated by Fortran? [closed]

I have a unformatted binary data file generated by gfortran. However, when the binary data is imported by Mathematica, a correct result is not obtained. This is my fortran code: ...
108 views

442 views

### Reading a file as a ByteArray?

I want to read in large files as byte strings. Import[..., "Byte"] yields a list of Integers that takes up much more space (16 times more) than the file. ...
159 views

### How can I import Real16 binary data? BinaryReadList doesn't work [closed]

How can I import Real16 binary data? BinaryReadList doesn't work: ...
106 views

### Turn binary number into string of words [closed]

I don't actually have any code for this, as I have no real idea how to do it. I have a large binary number combination that I know turns into some sort of string. How would I go about translating it?