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.
binary
14,839
questions
-1
votes
0
answers
8
views
Making a digital binary counter with 7 segment display in proteus
enter image description hereenter image description here
Hello I need help for a schematic project. I want to make a binary counter using 7 segment display with 4-bit LEDs(see picture for more info). ...
0
votes
0
answers
66
views
Receving wrong bytes over socket. CPP client to Python client
Sending C++ uint32_t to Python client through TCP socket.
I have two functions:
void send_int(uint num)
{
num = 255; //Assign to 255 for debug purposes
num = htonl(num);
...
0
votes
0
answers
35
views
Parsing scan code event data received from a character device in Linux
I need some guidance regarding the parsing and de-serialization of binary data received from a character device in Linux. I'm working on writing a program in rust that monitors keyboard input used for ...
0
votes
0
answers
10
views
What is the best test to run to compare presence/absence of something between sampling locations?
I have data on the presence/absence of four different pathogens found in edible crabs in 7 locations over 2 seasons. For this study, 30 crabs were collected from each site and for each crab the ...
2
votes
2
answers
83
views
How do I organize my binary parser's code?
I'm building a Mach-O 64 bit binary parser for a reverse engineering tool, ghidra style.
I want the program to output where we are in readable human language, only using file format identifiers.
Let ...
0
votes
0
answers
39
views
Binary Search in Java personalized implementation not working properly
Why is my code not working though I've tried dry running it 1000 times, but still I'm not able to find my doubt, maybe I'm short of the knowledge which will help me find the mistake, can anybody help ...
0
votes
0
answers
22
views
Adding two negative Hex numbers
I am trying to add two hex numbers given in two's compliment: A415 + A555. I'm having a bit of trouble with understanding the two's compliment inversion for adding.
I converted both numbers to binary ...
-1
votes
0
answers
33
views
How does one Compute Fractional Values into Different BCD Codes?
I know the basics of the Gray and 84-2-1 code, for example a value like 5 should be 1011 in 84-2-1
8 4 -2 -1
1 0 1 1
8 - 2 - 1 = 5
whereas in Gray Code it should be 101
101 (binary of 5)
add 1 to MSB ...
0
votes
0
answers
163
views
An error in my Lambda Calculus Implementation in C#
I am creating a C# library for Lambda calculus and lambda terms and I have error in my code:
namespace Datatypes.Collections.MathCollections
{
public abstract record Expression;
public record ...
3
votes
1
answer
68
views
How to convert binary to string (UUID) without UDF in Apache Spark (PySpark)?
I can't find a way to convert a binary to a string representation without using a UDF. Is there a way with native PySpark functions and not a UDF?
from pyspark.sql import DataFrame, SparkSession
...
-4
votes
1
answer
61
views
Converting a HEX color value to RGB in JavaScript
I have this code:
let hexInt = parseInt(hex, 16);
let r = (hexInt >> 16) & 255;
let g = (hexInt >> 8) & 255;
let b = hexInt & 255;
I know that a HEX digit requires 4 bits to ...
-1
votes
1
answer
40
views
Writing an Ifelese Command to Detect Whether a Word Appears in a Dataframe in R [duplicate]
I want to create a data frame column based on whether a specific dictionary of terms appears within text data.
I currently have a data frame, where the column text contains different texts. I would ...
1
vote
2
answers
113
views
Why doesn't my manually entered double value match the expected value in C?
Question:
As a beginner, i am curious about memory architecture and how values get stored in memory, so I tried this code. Nothing else.
I'm trying to manually input byte values to create a specific ...
0
votes
1
answer
39
views
Convert the greatest binary number (by number of binary digits) to decimal
Given a number of characters, I want to generate the greatest integer whose binary representation fits in that number of characters.
My code working perfectly fine:
const getValueOf=(y)=>{...
0
votes
1
answer
40
views
Is the rule for unsigned integer overflow, the carry in matches the carry out?
I'm reading a textbook on systems programming and it states that an overflow occurs for unsigned integers if and only if the carry-in bit is mismatched with the carry-out, in the left-most bit.
So if ...