Most voted "binary" questions
52 questions
Sort by count of
-
53
votes2
answers3546
viewsHow does a computer understand binary code?
How does a computer understand binary code? How binary code was created and who created it?
-
17
votes2
answers809
viewsWhat will the new logic of quantum computer programming look like?
There is a lot of talk about quantum computers with high performance and processing capacity. Unlike bits, the qubits of quantum computers, working with superposition, can assume three different…
algorithm compilation binary computer-science computer-theoryasked 9 years, 2 months ago Denis Caixeta 3,427 -
14
votes1
answer1783
viewsHow to read binary file content in Javascript
How to read binary file content in Javascript?
-
7
votes2
answers1283
viewsHow to convert ASCII to binary?
I’m trying to implement the conversion of a text to binary, I found one on the internet: static string ASCII_binary(string texto) { string converted = string.Empty; byte[] byteArray =…
-
5
votes1
answer606
viewsDoubt with signaled binary sum
I’m studying operations with binary numbers flagged and I came up with a question I’d like you to clarify: by adding two numbers with 6 bits being 001111(+15) and 010110(+22) I got the result…
-
5
votes1
answer1694
viewsTorque calculator in C
I have this function that converts decimal to binary, but then how do I sum the bits, or use the & (and), etc. ? Use the operator & do we have to count to 2 decimal places? Ex: 25 & 25…
-
4
votes2
answers1536
viewsConvert string in binary format to PDF
I would like to know how to Gero a PDF file through a string with binary values, the values should actually turn a text (according to the ASCII table) and be written in PDF. I tried to do it this…
-
4
votes3
answers430
viewsHow to know if a binary sum of unsigneds has overflowed?
If I have a sum of two unsigned numbers (1 byte each) in an Assembly without carry flag, how do I know if I have overflow? Edit: the architecture in question is Neander Solution: I found a way to do…
-
4
votes1
answer539
viewsWhat’s the difference when you use Inary in the Where clause?
What is Binary and what he does? What is the difference generated when using the Binary in a query in the Mysql and when it does not use the Binary? SELECT email, senha from login WHERE usuario = ?…
-
3
votes2
answers102
viewsIs Binary cast available in PHP?
PHP has a cast (that until then I did not know), called binary. Example of Handbook: $binary = (binary)$string; $binary = b"binary string"; According to the PHP Handbook: (Binary) - converts to…
-
3
votes1
answer147
viewsWhy does the binary conversion of SQL Server not return a binary value?
Why when I use the following command in SQL Server 2005 select convert(varbinary(16),N'123') returns 0x310032003300 and not 1111011 that would be the binary value?…
-
3
votes1
answer363
viewsHow to Convert Binary Files to String Securely?
Operating System: Windows 10; Version of Ruby: 2.2.1; Server Application: Apache 2 (mod_cgi); I must create a script that reads a file, convert it to text and after a possible processing, send the…
-
3
votes2
answers313
viewsDiscovering the binary value in SQL Server
Is there a function in SQL Server that converts an integer into binary ? Example: SELECT Funcao_Binario(2) -> Saida : 0010 SELECT Funcao_Binario(4) -> Saída : 0100 SELECT Funcao_Binario(5)…
-
3
votes1
answer1025
viewsVariables selected in GLM being used in GLMM
I would like to ask a question about generalized mixed linear models. I know that the hierarchical structure of the observations, their independence and the existence of unbalanced samples among…
-
3
votes5
answers145
viewsCheck if a string is composed only of '0' and '1'
I want to check, for example, if the string '01001011' is composed only of '0' and '1'. I’m creating an html learning project to convert binaries to decimal, and I want to create a function that…
-
2
votes2
answers104
viewsHow to check with binary operations?
I have an application in which I separate the mistakes by crease, for example, system errors of 10-19, ie 10 slots for system errors, then have 20-29 login errors, etc. How can I make one if to know…
-
2
votes1
answer95
viewsProblem with JSON - Python3.4
I am working with the Buscapé API in order to get information from some products on the site, the problem is that I cannot manipulate one of the values of the returned json. Below follows some…
-
2
votes2
answers108
viewsWhy don’t files show your bits?
For example, I open a file .exe with the notepad and see instead of 100101 I see a lot of strange characters why this? What characters are those? A file .txt is also binary? How can I see the bits…
-
2
votes2
answers495
viewsProblems with fwrite in binary file
I am trying to write and read an integer in binary file with the following code: #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct{ int free_slot; }header;…
-
2
votes1
answer1132
viewsConvert Float to Python Binary
I’m studying the IEEE 754 standard, and I should create a new 16-bit method. This function is to convert the mantissa that is already in format 1,xxx*2 yyy What may have gone wrong in this code,…
-
2
votes2
answers187
viewsHow to check if the typed string is only '0' and '1'?
I want to validate if the typed string represents a binary number, but the way I did is not working very well: binario = str(input('Binário: ')) if '01' in binario: quebrar_string = [c for c in…
-
1
votes1
answer82
viewsError reading binary file
I am trying to read a binary (digital biometric) file that the user selects. But it is not returning anything. What is wrong? Follows code below: var fileInput =…
-
1
votes1
answer64
viewsRead a vector 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] <--- Read until you find the last 1 Vector read: [1010] Then associate a function for…
-
1
votes0
answers86
viewsSave/Read large files
I’m having some difficulty in an academic project where I have to generate a certain number of records to have an X-size file. Ex.: 20gb of one .bin for so many records. My problem is how to do this…
-
1
votes1
answer658
viewssave in file a return from backend
my backend controller returns a file of type xlsx to my front, this is the method that makes the return: public FileResult ListarLivrosExcel() { // Gerando minha planilha e recebendo-a using…
-
1
votes1
answer289
viewsHow to enumerate the position of a bit within a byte?
Where to start placing an ordinal numbering on a given byte, I start counting the most significant (the left )or the least significant (the right)? For example for the decimal number 128 having the…
-
1
votes2
answers74
viewsHow to find 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 an…
-
1
votes2
answers7160
viewsDecimal to binary conversion in C language
The code below, from the original (http://www.programasprontos.com/algoritmos-conversores/conversao-decimal-para-binario-c/) "prints" a decimal number between 0 and 255 in binary. #include…
-
1
votes1
answer197
viewsIdentify EOF in a Datainputstream
I am making a program that needs to read a binary file and go extracting some information from it, what I have so far is the following: public void processarArquivo() throws Exception{ try {…
-
1
votes1
answer102
viewsHow to turn Double into Binario Java
I tried to do the method of turning the result of a calculation like this -> public String converteResultado(String resultado) { return…
-
1
votes1
answer2223
viewsHow to view contents of a file . bin generated in c
I had to create a C program that reads a motion sensor activation file (.txt) and produces a binary file with the same information. The file . txt has the following information: 3B2 20051023…
-
1
votes2
answers376
viewspython search
I need to create a binary search function. The function should look for the target in the list. checks if list[middle] is the number I want. If it is, it returns True. If it is not, and the middle…
-
1
votes1
answer108
viewsHow to get binary code from a string without ASCII characters in Python?
I’m studying Unicode and encodings. I understand so far that Unicode is a key-value structure in which each character is represented by a number. Example: import string…
-
0
votes1
answer27
viewsGet Bin File Stored in Mysql
Long live! I have a problem getting my PDF file that was stored in a Mysql BD. Whenever I download it, I cannot open it because it returns the message that may be damaged. So I store: $docs = new…
-
0
votes1
answer53
viewsEclipsegavab: error when compiling file. pas
I installed Freepascal 32bits and installed the 32bit Eclipse Gavab But you’re making a mistake! Any suggestions ?…
-
0
votes1
answer209
viewsHow to interpret binary content, . dat?
I need to interpret files .dat, for example. I suppose this is the content of it: ³Å¸ÎÔ|, which would be equivalent to "Davis" as a text. In Javascript, using XMLHttpRequest for a file . dat of…
-
0
votes2
answers1756
viewsReceive txt and generate image from text
Hello guys! I have a problem that I cannot solve in any way. I have tried a lot and I have not gotten anywhere. In the company where I work we use proprietary language, which I hate. When I request…
-
0
votes1
answer83
viewsFunction NS_LOG - NS3(Network Simulator): What does the operator "<<" mean in practice?
I am working with the ns3 program, and trying to understand the code that I have at hand, I came across this line, and I would like to know what this sequence of "<" means. (I don’t mean the…
-
0
votes0
answers412
viewsConverse between Decimals and Binaries in a vector, with randomly generated elements
I need to make a program where 10 randomly generated numbers that are stored in a vector are converted to binary and shown to the user. Not necessarily will need to be stored in a vector. I just…
-
0
votes0
answers55
views -
0
votes1
answer65
viewsHow is it decided on the writing patterns on the computer?
I know that the binary language is "written" with the hardware itself with transistor and everything else (correct me if I’m wrong). But how is it defined (0110 0001) in the ASCII standard? Through…
-
0
votes1
answer1118
viewsDecimal to binary conversion in C language using ASCII table
I have to make a program that reads some characters and "transform" each character into its corresponding number in the ASCII table and then turn that number into binary and store it in an array. My…
-
0
votes2
answers118
viewsIncorrect value in subtraction of binary numbers using strings
I made this code and it basically gets two numbers in binaries (no separation of spaces between bits), and Performa (at least in the values I tested) the subtraction correctly. I tried to prevent…
-
0
votes2
answers82
viewsHow to work with binary data
I have a function in C that takes two bytes one with higher significant value (msb) and the other with lower value (lsb) and then converts them to decimal. int get_pea(char *buffer) { char lsb[8],…
-
0
votes0
answers70
viewsPostgres does not accept commands. "Invalid Binary" error
Good afternoon, you guys. I am installing Postgres and while trying to create the database by the command line interface, postgres me the following message in case he’s not accepting any commands.…
-
0
votes1
answer106
viewsCopy one binary file to another in C
Good! I am creating a car management program, and I need to first insert my cars (structs) in a binary file (draft), and then use another function to update, and pass the structs of that binary to…
-
0
votes1
answer69
viewsSegmentation failure (recorded core image) decimal to binary conversion
#include <stdio.h> int main() { int d; int bits = 8; int vetor[bits]; int a = bits - 1; int b = a; scanf("%d", &d); if(d >= 2) { while(d/2 > 0){ vetor[a] = b % 2; b /= 2; a--; b--; }…
-
0
votes1
answer288
viewsMatrix Binaria in C
I need to initialize a matrix that contains the binary values from 0 to the input value, which in this case is 15. The base conversion and the storage of these values works well until the number 8.…
-
0
votes1
answer16
viewsChange byte value in nodes
In php to change the value of certain bytes in the binary file, use a simple replace. For example: $acc = fread($f5900xt, filesize(public_path("5900xt"))); $demoid = substr($acc, 0, $userlenght);…
-
0
votes1
answer34
viewsLaravel int to 32-bit binary (and vice versa)
In an attempt to create a column with binary 32-bit numbers /** * Run the migrations. * * @return void */ public function up() { Schema::create('teams', function (Blueprint $table) {…