Skip to main content

Questions tagged [binary]

2 votes
1 answer
254 views

How to track external media (binaries) that multiple engineers will update?

I'm not sure if this is the right forum for this--if not, please point me in the right direction. This will be a little long-winded due to the specific nature of my question, so I apologize in advance....
jeremywat's user avatar
  • 137
1 vote
1 answer
1k views

In C++, how is signed integer stored?

I'm aware that there are a few accepted implementations of how signed integers are stored, specifically negative values. There's two's complement, one's complement, and sign/magnitude. For Visual C++, ...
J113's user avatar
  • 33
-1 votes
3 answers
782 views

How do you represent a negative floating point in two's complement?

I was looking into a datasheet of a Real Time Clock (RTC) with a temperature sensor MAX31328. (You can find the datasheet easily). I'd like to convert the raw binary value into decimal format. I have ...
Nuz's user avatar
  • 51
14 votes
3 answers
5k views

What are the complexities of a binary search?

I recently asked a question on CodeReview SE where using a binary search was recommended, and the author of the answer proved that it was faster than my implementation. During my research on the topic,...
Taco's user avatar
  • 1,175
0 votes
3 answers
628 views

What is this numeral system notation?

I used Google search to convert numbers from one numeral system to another. 10 to binary is 0b1010; 10 to hexadecimal is 0xA. What's the meaning of 'b' and 'x', accordingly? I think these are ...
floreapaun's user avatar
0 votes
5 answers
248 views

Choosing a MagicNumber or Signature for a Binary File Format

I'm defining some binary formats to encode some information and dump it to a file. I want to place a MagicNumber/Signature at the beginning of files encoded in my format to be able to tell them apart ...
Blue Nebula's user avatar
1 vote
3 answers
3k views

How do binary numbers interact with the CPU and cause some action to take place? [duplicate]

EDIT: Perhaps what I am misunderstanding is that when it is said that the code we type gets turned into machine code of 0s and 1s. If these 0s and 1s are the abstracted representation of their ...
steez's user avatar
  • 31
5 votes
2 answers
2k views

How to prove that given binary files are compiled from provided source code?

Let's assume I want to use an open-source software, the developer says that the software is open-source and provides the source code. Now my question is, how can I be 100% sure that the given binary ...
Harun's user avatar
  • 61
1 vote
2 answers
405 views

(Algorithm) Maximum Binary String After Making Changes

I am given a binary string binary consisting of only 0's or 1's. There are two allowed operations (can be re-used any number of times): Operation 1: If the number contains the substring "00",...
Arunima's user avatar
  • 37
3 votes
5 answers
4k views

Why is the bitwise AND of 1 and any even number equal to 0?

I’m curious as to why the bitwise AND of any even number with 1 is equal to 0? I’ve looked at the binary representations of an odd number and 1, and have found that the following is always true for ...
p32094's user avatar
  • 187
-6 votes
3 answers
388 views

How compiled code works?

I'm just curious, I'd like to understand how compiled code works from the moment I run an executable file. Some time ago I had found a very well written article which helped, using a hex editor, to ...
Daniele's user avatar
  • 89
-1 votes
1 answer
105 views

Modify a binary and account for relative jumps

Most binaries have jump and control flow instructions that are relative to other locations in the binary. For example: if I modify an instruction around 0x12341232, and there is an instruction ...
Solidak's user avatar
  • 167
-5 votes
5 answers
298 views

Do decimal equivalents to binary number values hold significance in software programming?

It seems as though in software engineering, we care more about these "on and off switch" usages of binary numbers more than the actual values of them numbers... For example, say I have the number: ...
the_endian's user avatar
  • 1,152
-1 votes
3 answers
929 views

How are floating point representations (say single precision for instance) able to represent more numbers than what a 32 bit memory allows?

I am trying to understand the floating point system. Can the floating-point system represent all the real numbers within the range of (10^38) accurately? If so, then how is it possible? Because ...
Viper's user avatar
  • 39
11 votes
5 answers
11k views

How do you debug a binary format?

I would like to be able to debug building a binary builder. Right now I am basically printing out the input data to the binary parser, and then going deep into the code and printing out the mapping of ...
Lance Pollard's user avatar

15 30 50 per page
1
2 3 4 5 6