Questions tagged as 'binary'

2
answers

How to check with binary operations?

I have an application in which I separate errors by range , for example, system errors of 10-19, ie 10 slots for system errors, then I have 20- 29, etc. How can I make a if to know what kind of errors I'm handling without using regula...
asked by 23.06.2016 / 18:03
2
answers

Problems with fwrite in binary file

I'm trying to write and read an integer in a binary file with the following code: #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct{ int free_slot; }header; void main(void){ FILE *fd = fopen("te...
asked by 30.10.2017 / 17:06
1
answer

Problem with JSON - Python3.4

I'm working with the API of BuscaPé to be able to remove information from some products of the site, the problem is that I can not manipulate one of the values of the json returned. Here are some results I could get: resp = buscape.find_produc...
asked by 23.09.2015 / 00:39
2
answers

Decimal to binary conversion in C language

The code below, from the original ( link ) "prints" a decimal number between 0 and 255 in binary. #include <stdio.h> #include <stdlib.h> int main() { int n; // Número de entrada int r; // Resultado do deslocamento int i; // C...
asked by 28.06.2017 / 05:03
2
answers

How to find out the data type of a binary file

One problem I often face is figuring out what kind of data to use to store the contents of a binary file. For example, when I start a simpler emulator project like CHIP8 or Gameboy, I usually use a 8-bit value data type as unsigned char o...
asked by 29.05.2018 / 13:50
1
answer

How to view contents of a .bin file generated in c

I had to create a program in C that reads a motion sensor activation file (.txt) and produces a binary file with the same information. The .txt file has the following information: 3B2 20051023 014857393 609f 3B3 20051023 014857393 00f...
asked by 16.10.2017 / 16:43
1
answer

Error reading binary file

I'm trying to read a binary (digital biometric) file that the user selects himself. But it is not returning anything. What's wrong? Follow the code below: var fileInput = document.getElementById('fileInput'); var file = fileInput.files[0...
asked by 17.05.2015 / 18:21
1
answer

Identify the EOF in a DataInputStream

I'm doing a program that needs to read a binary file and go extracting some information from it, what I have so far is this: public void processarArquivo() throws Exception{ try { FileInputStream fileInputStream = new FileInputStr...
asked by 19.08.2017 / 02:01
1
answer

How to enumerate the position of a bit within a byte?

Where to start putting an ordinal number in a given byte, do I start counting the most significant (left) or least significant (right)? For example for the decimal number 128 that has the binary representation: 1000 0000 If I want to ref...
asked by 12.06.2017 / 17:01
1
answer

Read a vector up to a stop bit

I want to read an 8-bit binary vector backwards, and stop until I read the last 1 . For example: [00010101]
asked by 19.09.2015 / 14:49