Questions tagged [binary]

87 questions
50
votes
3 answers

Why is 2^16 a "special" number?

OK, I feel stupid asking this - but in Jeff's article: Getting the Interview Phone Screen Right and originally stated in the 5 essential phone screen questions: They shouldn't stare blankly at you when you ask with 2^16 is. It's a special…
javamonkey79
  • 875
  • 2
  • 10
  • 13
43
votes
3 answers

What are binaries?

I see very often people using term binaries in different context. What are binaries? Collection on binary files, installation files, .dll files or what? Or is it just an general term for some collection of files on disk?
jrara
  • 595
  • 1
  • 5
  • 5
42
votes
12 answers

Is there an alternative to bits?

Is there an alternative to bits as the smallest unit of data? Something that won't be only 0 or 1, but actually hold many possible states in between? Wouldn't it be more natural to store floats like that?
Dokkat
  • 557
  • 4
  • 6
36
votes
5 answers

Does storing plain text data take up less space than storing the equivalent message in binary?

As a web developer I have very little understanding of binary data. If I take the sentence "Hello world.", convert it to binary, and store it as binary in an SQL database, it seems like the 1s and 0s would take up more space than the letters. It…
john doe
  • 1,007
  • 1
  • 9
  • 9
33
votes
3 answers

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 they needed to transition from PowerPC to…
Ixrec
  • 27,621
  • 15
  • 80
  • 87
28
votes
22 answers

Why learn hexadecimal?

I've taken quite a few intro programming classes in my day, mostly just to get my feet wet in every different kind of programming I find. Not surprisingly, just about every class runs through the same format : intro to hardware, intro to software,…
jwegner
  • 201
  • 1
  • 3
  • 6
24
votes
3 answers

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 folder with the wonderful name data. The assignment…
Vorac
  • 7,073
  • 7
  • 38
  • 58
22
votes
6 answers

Is machine language always binary?

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 exactly what to do - always binary? I.e. always composed…
Aviv Cohn
  • 21,190
  • 31
  • 118
  • 178
18
votes
4 answers

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 bytecode through it one good time, and oftentimes,…
Panzercrisis
  • 3,145
  • 4
  • 19
  • 34
15
votes
3 answers

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 for several minutes and then answered 32. 32 seems to have been…
Niklas Rosencrantz
  • 8,008
  • 17
  • 56
  • 95
14
votes
3 answers

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, I came across a table that shows the…
Hazel へいぜる
  • 1,165
  • 1
  • 8
  • 19
12
votes
3 answers

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 platform perhaps for many different architectures? I got…
Niklas Rosencrantz
  • 8,008
  • 17
  • 56
  • 95
11
votes
5 answers

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 the input to the output, then taking the output…
Lance
  • 2,537
  • 15
  • 34
9
votes
4 answers

File naming convention for images stored in version control?

My application has an icon file which is stored in version control. Now tomorrow I might decide to change the icon. I'm debating between two possible naming conventions for the icon file: Keep the filename fixed, e.g., application.ico Have the…
User
  • 1,541
  • 2
  • 16
  • 30
8
votes
4 answers

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 accompanied by the proper NOTICE file and if needed the…
Nick Russler
  • 191
  • 4
1
2 3 4 5 6