The tag has no usage guidance.

learn more… | top users | synonyms

-5
votes
0answers
46 views

Floating point number arithmetic operation in binary number system [on hold]

Could somebody please explain the floating point number arithmetic operation in binary number system I want to know how the following floating pointing operation is performed in 64 bit double ...
1
vote
0answers
28 views

Viewing binary files in MSVS under Windows 10 [migrated]

For ages I've been using MS visual studio 15 to view binary files, simply by doing file|open. My files have a custom extension, 'SQ3', but VS seemed to happily infer that they aren't text, and display ...
2
votes
4answers
204 views

What separates text files from binary files, considering they are stored in binary?

There are text files and there are image, video, and music files. Why are image, video, and music files considered binary files, and why are text files not?
2
votes
1answer
115 views

Why directly edit binary files?

This may be a naive question, but I wonder when and why (non-research) developers would directly edit a binary file. It seems like the only good reason to use one is to create a kludge when you need ...
0
votes
2answers
137 views

What is a Relocatable Binary?

What is a Relocatable Binary? I tried doing some search on Google, but I am still confused. Also: what is the difference between an Executable and a Relocatable Binary?
17
votes
2answers
283 views

Optimize a git repo, containing large binary files

Our project is about 11GB, 10 of which are binary data (.png images). Consequently, a git diff or git status operations take up more than a minute. Fortunately all data files are separated into a ...
2
votes
0answers
52 views

Restricted randomization of a binary vector

Suppose I have a binary vector of sample size N with each of the two possible values (e.g., 0 and 1 occurring equally often). For example, if N=10, the binary vector is: 0 0 0 0 0 1 1 1 1 1 Suppose ...
4
votes
1answer
159 views

Representing a number in 12 Bit 2's Complement Fixed Point

The original question is as follows: Consider a 12-bit two's complement fixed point representation, with 8 bits for the integer part and 4 bits for the fraction. What is the binary encoding of ...
0
votes
0answers
59 views

Persisting and manipulating JS ArrayBuffer data on the server

My node.js app has to deal with (sometimes large; a few MB) tables of numerical data. I'm about to use JavaScript's native binary objects for this purpose (i.e. ArrayBuffer and friends), because they'...
1
vote
1answer
77 views

Benefits of this data format

I'm integrating with a bluetooth blood pressure monitor, and I've come across one of the most bizarre data formats I've ever seen. The systolic, diastolic and pulse rate (all ints, should all be ...
2
votes
2answers
511 views

audio file processing in C++

I thought of the following project that I want to pursue: I want to create a C++ program, that can play audiofiles and visualize the amplitudes of individual frequency bands in real time (e.g. with ...
0
votes
1answer
31 views

Generating New Media Content From Binary Patterns

At the most basic level, a digital media file (document, song, video, etc) is just a rather large pattern of 1's and 0's. We can say that for any given piece of digital media, there corresponds a ...
0
votes
3answers
99 views

Are hex dump and binary-to-text encoding related or different things?

Binary-to-text encoding is to represent binary data as characters. Hex dump of binary files seem also do the same for reading binary files. Are they related or different things?
2
votes
3answers
517 views

Data format for binary data transfer

I have to make an oscilloscope. Ideally, the oscilloscope connects to a probe. This probe should be another program, and could get the data locally or from a network. This data are numbers, floats and/...
0
votes
3answers
235 views

Does it really need to convert decimal,string, etc to binary?

I'm very new to programming. Just read some articles about algorithm for converting a decimal or string to binary. But,according to what I know, computers hold these data in binary form. So why don't ...
0
votes
1answer
965 views

How to determine whether two trees (not necessarily binary) are isomorphic

Two ordered trees T' and T'' are said to be isomorphic if one of the following holds: ◦ both T' and T'' consist of a single node ◦ both T' and T'' have the same number k of subtrees, and the ith ...
20
votes
3answers
1k views

Why aren't “fat binaries” more widely used for cross-platform applications?

As far as I know, so-called "fat binaries"--executable files that contain machine code for multiple systems--are only really used on Apple PCs, and even there it seems like they only used them because ...
1
vote
0answers
210 views

Optimal data structure for binary data/Java

I have several input formats mostly restricted to geotiff and some proprietary binary formats. I import them into my program and then need to export them into various other data formats (also binary) ...
-1
votes
2answers
125 views

How were assemblers created straight from binary? [duplicate]

How did these earlier programmers know what combinations of binary produced certain results? Is there a way I can create an assembler from binary today?
1
vote
1answer
2k views

Bitwise operation on uppercase ASCII character turns to lowercase. Why?

I came across this in the http_parser library of node.js implementation. When I bitwise-OR an ASCII capitalized character code, it converts into its lowercase version. The lowercase version remains as ...
0
votes
2answers
299 views

When trying to find out if a number is even or odd: AND 1 or OR 0

I recently learned of the trick for finding out if a binary number is odd or even. If the last bit in the number is 0, then the number is even. If it ends in a 1, then the number is odd. In the ...
6
votes
4answers
1k views

Is it allowed to embed an LGPL command-line tool?

I want to sell a closed-application that depends upon a certain command line tool. Am I allowed to distribute my software including this command line tool? For example, as a separate binary ...
3
votes
1answer
163 views

Conveniently sorting and (binary?) searching an array of pairs of numbers?

So I have an array of distinct pairs of positive integers. That is, my array looks something like this (for instance): { (1,5) , (6,4), (5,3), (2,3), (2,4) } And my task is, for a given pair (a,b) ...
3
votes
1answer
2k views

Benefits of Java ByteArrayInputStream vs byte array?

I have a scenario where my Java process will be receiving a stream of binary data: public class DataHandler { public void handleData(DATA data) { // TODO: Do something with data } } ...
1
vote
1answer
86 views

Is it possible to modify a native executable and change (dynamic) library it depends on?

Say I compile a simple application called myproggy that depends on the libfoo dynamic library. Assuming I have another dynamic library libbaz that implements absolutely the same interface (in other ...
3
votes
1answer
576 views

How do you set and check a single bit in a programming language that does not support bitwise operations?

I'm using a programming language (more a scripting language) that does not support any bitwise operators like AND, OR, XOR, NOT (and shift as well). Common arithmetic and logical operations like + - *...
0
votes
1answer
49 views

Using a binary from a project that violates GPL

There is an open source project which uses GPLv2. It had numerous releases that complied with GPL in the past where source code was available for given binaries. The newest source code is about 18 ...
3
votes
2answers
596 views

Why do binary files load quicker than alphanumeric text files?

I've noticed that when I load/store large data files in a binary format, the program runs much faster than if I load data from an ASCII encoded file. Why is this the case? The data in my case is ...
0
votes
3answers
896 views

What are the bytes between the MSB and LSB named? [closed]

I've searched around and can't find anything on what the middle bytes of a >16-bit integer are called, if anything. Are there standard names for these bytes? E.g. the number 0x0D0C0B0A would have: ...
19
votes
6answers
6k views

Is machine language always binary? [duplicate]

I know absolutely nothing in low-level stuff, so this will be a very newbie question. Please excuse my ignorance. Is machine language - the series of numbers to that tell the physical computer ...
0
votes
2answers
525 views

Is byte stuffing required when using a packet field length

I'm involved in a project which involves implementing a binary protocol that will be transmitted over TCP. During our early discussions we have hit a brief snag on deciding whether byte stuffing is ...
14
votes
4answers
5k views

Why can't native machine code be easily decompiled?

With bytecode-based virtual machine languages like Java, VB.NET, C#, ActionScript 3.0, etc., you hear sometimes about how easy it is to just go download some decompiler off the Internet, run the ...
3
votes
2answers
370 views

How exactly does a program (executable image) and library (pre-compiled image) “link” together?

I know very well of the difference of static versus dynamic linking. What I want to know is, when linking statically (with a library like Winmm.lib on Windows), how does the linker "link" the pre-...
2
votes
2answers
760 views

How to safely run random binary codes? [closed]

Okay, so I am looking for a way to safely run a randomly generated binary code. I also need to be able to decompile the code. Any ideas and all programming languages are welcome. BTW it most be ...
0
votes
1answer
444 views

How many ALU additions are needed to add three numbers?

Please give reasons for your answer. As I found, two additions are needed. This is because every number to be add needs to changed to binary. Then addition is done between two binary numbers where ...
2
votes
3answers
4k views

Why does division and multiplication by 2 use the shift operator rather than division operator?

While looking at the code in C for division/multiplication by 2, it is found that shift operator is used rather than division operator. What is the advantage of using shift over division operator?
3
votes
1answer
335 views

What is meant by binary compatibility? What is its importance during serialization/deserialization in a language like Java that deals in byte code?

In computing what is meant by binary compatibility? I read about it in context of serialization/deserialization that this process of serialize/deserialize should be binary compatible. What does it ...
3
votes
2answers
636 views

How should I structure a C# application that reads & writes binary data?

I have to read and write binary "chunks" of approximately 1Mb each. The data can come in the form of a stream or a in-memory byte[]. Normally I would use a Struct with a fixed layout, but there are ...
3
votes
1answer
216 views

Can we create a GPL application that has a payware advertisement on it?

We've been thinking of using GPL components to make a GPL application, and freely give it away. We then want to use that as a loss-leader. In that free application, where even the source code is ...
6
votes
3answers
18k views

Is there something special about the number 65535?

2¹⁶-1 & 2⁵ = 2⁵ (or? obviously ?) A developer asked me today what is bitwise 65535 & 32 i.e. 2¹⁶-1 & 2⁵ = ? I thought at first spontaneously 32 but it seemed to easy whereupon I thought ...
3
votes
1answer
3k views

Extracting color profile information from JPEG files

I'm trying to look up info about reading JPEG's color profile info and to my surprise there's very little open specific how-to information on that regard, but rather lots of general explanation on ...
2
votes
2answers
241 views

Which numeral systems are useful in computer science?

I am wondering which numeral system different programmers are using, or would use if their language has support for them. As an example, in C++ we can use: Octal by prefixing with 0 (e.g. 0377) ...
4
votes
4answers
532 views

How much is modern programming still tied to underyling digital logic? [closed]

First of all: I've got no academic background. I'm working primarily with Java and Spring and I'm also fond of web programming and relational databases. I hope I'm using the right terms and I hope ...
5
votes
3answers
4k views

Compiling vs using pre-built binaries performance?

Will performance be better (quicker) if I manually compile the source for a software component for the actual machine that it will be used on, compared to if the source was compiled on another ...
3
votes
1answer
125 views

What does “windowed streaming” stand for?

So I was asking around the Mercurial development mailing list about binary diffing and patch handling and I got the following examples: whole file approaches (classic diff, bsdiff, Mercurial's ...
1
vote
1answer
136 views

What does it mean “you can pick K to be whatever you want” in Excess-N notation?

I prefer providing an example to explain the following paragraph: However, since excess K representation using N bits has two parameters, K and N, you can pick K to be whatever you want. You can ...
2
votes
4answers
3k views

Understanding binary numbers in terms of real world objects [closed]

When I represent a number in the decimal system, I have an intuitive knowledge of what it amounts to. For example take the number '10': I understand that it means 10 apples or 10 people... i.e I can ...
1
vote
1answer
418 views

How is this number calculated?

I have numbers; A == 0x20000000 B == 18 C == (B/10) D == 0x20000004 == (A + C) A and D are in hex, but I'm not sure what the assumed numeric bases of the others are (although I'd assume base 10 ...
5
votes
2answers
8k views

binary representation in Python and keeping leading zeros

I wanted to use the base64 Python library to encode a sequence of binary digits into base 64. Would it be possible to do it without converting to a string? If not, what is the best way to do it, ...
7
votes
9answers
2k views

Is it any good to use binary arithmetic in a C++ code like “C style”?

I like the fact that the C language lets you use binary arithmetic in an explicit way in your code, sometimes the use of the binary arithmetic can also give you a little edge in terms of performance; ...