Questions tagged [binary]

Binary, the base-2 numeral system, represents numbers using two symbols: 0 and 1. For compiled computer programs, use the "executable" tag instead.

-1
votes
0answers
25 views

Java numeric conversion is unclear

Consider the following piece of code:byte newBytes[]=new byte[(myBytes.length + 8) & ~7];I understand java doesn't really deal with unsigned ints, so if the length of myBytes was INT_MAX, ...
0
votes
1answer
9 views

Serve xlsx file from MongoDB binary using Node.js

I have some Excel documents (xlsx) saved in MongoDB in binary. I would like node.js to retrieve a file from the database when a user navigates to a url and serve the file for the user to download. I'm ...
1
vote
0answers
28 views

binary search function does not reach the the end

import java.util.Scanner;public class GuessingGame {private Scanner reader;public GuessingGame() {// use only this scanner, othervise the tests do not workthis.reader=new Scanner(...
-1
votes
0answers
17 views

How to write letters to address in gdb

I am trying to change an address on gdbHowever if I want to change the address to: 0x1234ABCDIf I write 1234ABCD it writes 1234 and then the decimal value of A (41) and decimal value of B (42)So it ...
0
votes
0answers
8 views

Grep with redirect is giving null byte

My grep command is generating a NUL byte at the end of its output.I have file.xml which contains only:<Game><Player p1="Bob"/><Player p2="Fred"/></Game>Now ...
1
vote
2answers
19 views

I need to make a function to convert an integer to binary , with a set number of bits in python

So I've currently got a function that allows the user to give an integer and can distinguish between an integer and an exiting string, as well as a random on. However I'm struggling with making ...
1
vote
0answers
37 views

php binary stream parsing performance

I have binary file composed by several (+10k) records of 6 bytes each:As example record a have a byte string like this ÿvDVAscii : 152 + 118 + 68 + 86 + 27 + 15Binary: ...
1
vote
0answers
44 views

Converting dec to binary, octal and hex problem

The task is on Hackerrank. Print 3 numbers in their binary, octal and hex. Numbers must be below 10^6 or end the program. There are 2 Test Cases. I've done the Test Case #0, but I don't know what else ...
-1
votes
0answers
23 views

Reading 8 digits at a time(binary)

How can I read 8 digits at a time from a file that looks like this: 0101000011100001011100100110100101110100111000010111010001100101 and then check for the number of 1 bits and eliminate the first ...
1
vote
3answers
29 views

Decimal to binary assignment in Java

Hi I have an assignment where I have to convert a variable 'binary' (which is a random binary (11001 for example)) and print it. It's hard because there is no potency feature built in JavaExample: ...
0
votes
2answers
29 views

Decimal to IEEE 754 Single-precision IEEE 754 code using C

We have an assignment in class to convert from Decimal to single precision using c and I'm completely lost.This is the assignment:The last part of this lab involves coding a short c algorithm. ...
2
votes
1answer
33 views

Recursive Binary Search Tree Python

I want to implement a binary search tree with element, left & right child and parent in python. class BSTNode:""" An internal node for a BST . """def __init__(self, item):""" ...
1
vote
1answer
41 views

Factoring input to listed frequencies

I am trying to write a function where it calculates the lowest possible coin-change return for a value e.g. you could give 0.70 with a 0.50 + 0.20.This is the code I have written so far:def ...
0
votes
2answers
43 views

How to interpret a binary Bitmap picture, so I know which color on which pixel i change when changing something in the Code?

I just used this code to convert a picture to binary:import iotme=input("Name: ")with io.open(tme, "rb") as se:print(se.read())se.close()Now it looks like this: ...
1
vote
1answer
60 views

Adding binary arrays with different size

I made binary arrays from number and its bit length per line, if 295289042101659 with 6 bits per line, number sizes 49 bit so in array, it would be 6 bits X 9 line, through the code and modified to 6-...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,