binary Questions

4

Solved

In Linux we can do echo -n -e '\x66\x6f\x6f' > test.txt to write HEX values to a file. How can this be done simply in Windows batch?
Yolande asked 11/12, 2017 at 10:21

25

Solved

Does anyone know how to add 2 binary numbers, entered as binary, in Java? For example, 1010 + 10 = 1100.
Trygve asked 17/12, 2011 at 23:5

9

I need to convert a binary input into a decimal integer. I know how to go from a decimal to a binary: n = int(raw_input('enter a number: ')) print '{0:b}'.format(n) I need to go in the reverse d...
Carabiniere asked 13/2, 2014 at 21:23

7

Solved

I don't understand why SELECT UUID(); Returns something like: 3f06af63-a93c-11e4-9797-00505690773f But if I insert it into a binary(16) field (the UUID() function) with for instance a BEFORE ...
Lauder asked 31/1, 2015 at 11:36

10

Solved

I need to convert int to bin and with extra bits. string aaa = Convert.ToString(3, 2); it returns 11, but I need 0011, or 00000011. How is it done?
Nighthawk asked 28/5, 2014 at 7:23

5

Basically what I want to do is take a file, bring its binary data(decimal of course) into an list and then generate a grayscale bitmap image using PIL based on that list. For example if the file i...
Closemouthed asked 26/5, 2012 at 3:7

13

Solved

I have a binary file. I don't know how it's formatted, I only know it comes from a delphi code. Does it exist any way to analyze a binary file? Does it exist any "pattern" to analyze and deseri...
Stabler asked 22/6, 2009 at 8:24

4

Solved

I have a file which mixes binary data and text data. I want to parse it through a regular expression, but I get this error: TypeError: can't use a string pattern on a bytes-like object I'm guess...
Analiese asked 11/4, 2011 at 9:0

13

Solved

I have an array of Strings that represent Binary numbers (without leading zeroes) that I want to convert to their corresponding base 10 numbers. Consider: binary 1011 becomes integer 11 binary 100...
Quake asked 16/4, 2012 at 17:45

21

Solved

I want JavaScript to translate text in a textarea into binary code. For example, if a user types in "TEST" into the textarea, the value "01010100 01000101 01010011 01010100" sho...
Umbilicate asked 20/1, 2013 at 23:36

8

Solved

try to generate my project into exe file, but get error: before: "dotnet build -r win10-x86" is ok after run generated exe, all is ok also: indows DPAPI to encrypt keys at rest. Hosting e...
Zemstvo asked 23/8, 2018 at 15:55

4

How can I get a list of all the dynamic libraries that is required by an elf binary in linux using C++? Once I've managed to extract the information (filename?) from the binary I can find the act...
Windowpane asked 24/3, 2014 at 14:50

8

Solved

Scala has direct support for using hex and octal numbers: scala> 01267 + 0100 res1: Int = 759 scala> 0x12AF + 0x100 res2: Int = 5039 but how do you do express an integer as a binary numbe...
Georgianngeorgianna asked 25/8, 2011 at 21:1

3

Solved

I have some binary data that I want to encode in a qr-code and then be able to decode, all of that in bash. After a search, it looks like I should use qrencode for encoding, and zbarimg for decodin...
Zonate asked 3/3, 2020 at 11:26

16

I'm converting an unsigned integer to binary using bitwise operators, and currently do integer & 1 to check if bit is 1 or 0 and output, then right shift by 1 to divide by 2. However the bits a...
Calore asked 4/2, 2012 at 21:42

8

I tried to convert a double to its binary representation, but using this Long.toBinaryString(Double.doubleToRawLongBits(d)) doesn't help, since I have large numbers, that Long can't store them i.e ...
Celsacelsius asked 15/6, 2011 at 15:1

7

It is possible to convert binary to decimal by this: var binary = "110"; var int = parseInt(binary, 2); document.getElementById("results").innerHTML = int; <div id="results"></div&...
Evapotranspiration asked 30/9, 2014 at 18:2

1

I'm having issues reading a binary PList. I'm using a windows computer and I've tried several pList readers. I really can't seem to get past the error "unexpected character 'b' at line 1".
Keitloa asked 23/7, 2015 at 18:9

7

Solved

Say I have generated the following binary file: # generate file: python -c 'import sys;[sys.stdout.write(chr(i)) for i in (0,0,0,0,2,4,6,8,0,1,3,0,5,20)]' > mydata.bin # get file size in bytes...
Venosity asked 14/11, 2010 at 22:31

7

Solved

I'm having a little trouble grabbing n bits from a byte. I have an unsigned integer. Let's say our number in hex is 0x2A, which is 42 in decimal. In binary it looks like this: 0010 1010. How would...
Stinking asked 6/3, 2013 at 18:57

7

Solved

I'm trying to simply convert a byte received from fget into binary. I know the value of the first byte was 49 based on printing the value. I now need to convert this into its binary value. unsign...
Helicopter asked 5/11, 2009 at 19:36

18

Solved

I have two inputs in binary, and I'm returning the addition result in binary as well. var addBinary = function(a, b) { var dec = Number(parseInt(a, 2)) + Number(parseInt(b, 2)); return dec.toSt...
Inflated asked 1/11, 2016 at 1:39

16

Solved

Instead of just the lowest set bit, I want to find the position of the nth lowest set bit. (I'm NOT talking about value on the nth bit position) For example, say I have: 0000 1101 1000 0100 1100 1...
Jazzy asked 5/10, 2011 at 23:51

4

Solved

I want to convert a string, using the string class - to Binary. What is the fast way to do this character by character. Loop? Or is there some function out there that will convert for me? 1's and 0...
Cognize asked 17/4, 2012 at 2:9

9

Solved

Why does a byte only range from 0 to 255?
Zwinglian asked 13/2, 2011 at 19:55

© 2022 - 2025 — McMap. All rights reserved.