binary

Books on hexadecimal and binary systems

I have a basic understanding of hexadecimal and binary representations, which I'd like to improve. Can anyone recommend books that can help me along? Thanks. ...

How are negative numbers represented in 32-bit signed integer?

How are negative number represented in 32-bit signed integer? Is it two's or one's complement? or the last bit on the left is like a flag? For example: (-10) ...

Count bits used in int

If you have the binary number 10110 how can I get it to return 5? e.g a number that tells how many bits are used? There are some likewise examples listed below: 101 should return 3 000000011 should return 2 11100 should return 5 101010101 should return 9 How can this be obtained the easiest way in Java? I have come up with the follow...

how to send binary data within an xml string

I want to send a binary file to .net c# component in the following xml format <BinaryFileString fileType='pdf'> <!--binary file data string here--> </BinaryFileString> In the called component I will use the above xml string and convert the binary string received within the BinaryFileString tag, into a file as specified by the file...

Verify 64 bit binary on windows

How can I verify that a .exe file is built for 64 bit on Windows ? I am used to Linux where I can simply use the 'file' command to see this. ...

Bitwise operations in BC?

$ bc BC> ibase=2 BC> 110&101 // wanna get 100 (standar_in) 8: syntax error Wikipedia informs that the ops are "|, & and ^". It may be that they work only in certain BC-types or I misread something. ...

Building elf within Eclipse within Windows

Hey guys, I'm having trouble building an Elf file within Eclipse within Windows. It seems that everytime I build, a PE / portable executable for windows is created. I've gone into the Binary Parser section and checked Elf Parser while making sure that everything else is unchecked. However, I continue to end up with a PE which I cannot r...

read url in binary mode in java

In java I need to read a binary file from a site and write it to a disk file. This example http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html could read webpages succesfully, but when I try to read a binary file from my localhost server and write it to a disk file the contents change, corrupting the binary file. Usin...

Perfmon .blg file specification / parsing library

Hi, I've googled and googled, but found nothing. (Where) can I find a detailed, low-level spec for the Perfmon binary .blg file format? Or even better, has anyone written a low level, open source library (preferably in C, but any language would do) for parsing .blg files? Thanks, Andreas ...

Hex editor for viewing combined string and float data

I have a binary file of unknown format that I need to be able to read. I have access to a program which can 'unpack' the file, but the user interface is terrible for exporting data. I've extracted a few points in an attempt to search for them in the file and discover a pattern, but it's not an efficient method. What I'm trying to do is ...

how do I base encode a binary file (JPG) in ruby

I have a binary files which needs to be sent as a string to a third-party web-service. Turns out it requires that it needs to be base64 encoded. In ruby I use the following: body = body << Base64.b64encode(IO.read("#{@postalcard.postalimage.path}")) body is a strong which conists of a bunch of strings as parameters. Does this...

How can I access the sign bit of a number in C++?

I want to be able to access the sign bit of a number in C++. My current code looks something like this: int sign bit = number >> 31; That appears to work, giving me 0 for positive numbers and -1 for negative numbers. However, I don't see how I get -1 for negative numbers: if 12 is 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0...

Wix CustomAction Binary SourceFile not found

<Binary Id="binUpdate" SourceFile="c:\xxx\Update.exe"/> <CustomAction Id="Update" BinaryKey="binUpdate" Execute="deferred" ExeCommand="c:\xxx" /> When I build a Wix project with the above custom action, it complains that "The system cannot find the file 'C:\xxx\Update.exe". This update.exe is deployed by the same msi. So, how do I ma...

How to tell Subversion to display binary files using an external program?

I have some code which, like java, is stored in a binary format, and I have the applications to display and modify this code setup in the Subversion's config file. But when I run svn diff for these file, Subversion prevents me =================================================================== Cannot display: file marked as a binary ty...

How change Subversion's default binary mime-type?

Subversion sets a binary file's svn:mime-type property to application/octet-stream by default. I need to change this default to some other mime-type. When I import for the first time this code, I would like Subversion to set mime-type to the one I choose. The reason is that my code base contains code in binary files (proprietary forma...

Publish Flash SWF as Linux Executables debian or rpm flavours ?

Hi , Adobe Flash CS4 has the option to publish the swf as windows executable . Is there an Option to publish swf as Linux executables ? Are there any work around where in which flash files has to be execute inside Linux with an embedded standalone flash player. Any help appreciated Thanks! ...

Boost Binary Serialization Problem

Hi all, I have a problem using boost serialization using binary archives. It works when using a file stream but I want to store it in my local variable and ultimately save/load it to/from berkeley db. When executing the program I get a *boost::archive::archive_exception*: 'stream error' when instantiating the *binary_iarchive*. #inclu...

Convert NSData to primitive variable with ieee-754 or twos-complement ?

Hi every one. I am new programmer in Obj-C and cocoa. Im a trying to write a framework which will be used to read a binary files (Flexible Image Transport System or FITS binary files, usually used by astronomers). The binary data, that I am interested to extract, can have various formats and I get its properties by reading the header of...

Write Java objects to file

Is it possible to write objects in Java to a binary file? The objects I want to write would be 2 arrays of String objects. The reason I want to do this is to save persistent data. If there is some easier way to do this let me know. Thanks in advance! ...

Non binary tree solving in C

i have to create a program which can have n number of nodes and each subnode can have n number of subnodes and so on, its not a binary tree. i need to know how can one create it? ...