The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [binary]

Related to binary arithmetic and number system - Base-2 system which represents numeric values using two symbols 0(zero) and 1(one). Use `boolean` tag for logical operations related questions that does not involve binary arithmetic.

Filter by
Sorted by
Tagged with
0
votes
2answers
107 views

VHDL: difference between using “+” or writing our own adder

I would like to know what would be the difference between between using "+" or writing an adder for adding two numbers: ...
0
votes
2answers
47 views

If a 4-bit binary digit in 2's Complement form is stored in 8 bits how is it represented?

I am quite new to Digital Logic. I got this doubt while solving a problem. If a 4 bit binary digit in 2's complement e.g. X3 X2 X1 X0 is stored in an 8 bit space what will be the representation in ...
-1
votes
2answers
112 views

How transistor processes binary? [closed]

I know that processors perform the tasks in binary. If I give an instruction to the computer, for instance, I have pressed letter "A", which is denoted as 01000001 in binary. How does a transistor ...
2
votes
0answers
61 views

Intuitive bitshift in hex

In binary, bitshifting is pretty straight forward for example, a binary number of: 10000001 with a left bit shift of 1 becomes : 00000010 However in Hex, a hex number of: 1051 with a left ...
1
vote
1answer
128 views

Understanding an unknown digital encoding

I'm trying to understand a certain undocumented digital protocol. It looks similar to Miller or coded mark inversion (CMI) encoding. So far I managed to decode the encoded data and get the expected ...
0
votes
2answers
58 views

How does carry in work in full adders?

Yesterday I asked a similar question and realized I still don't quite get it, so I'm sorry about that. Here is explicitly what I mean: This is a part of a full adder. The first row in which ...
0
votes
3answers
71 views

How to better understand binary data streams as electric signals?

I'm aware that at any step of any computer process the input of a user/program (that gets translated from code to machine language and then to cpu instructions), is represented using both electrically ...
0
votes
3answers
119 views

when and how is the machine language (binary stream) mapped to an existing instruction?

I'm trying to better understand the entire process of coding, which involves translating the higher level languages (c++/java/python and so on) into binary data that tells the CPU to execute ...
0
votes
4answers
72 views

binary addition / truth table?

I'm trying to understand how binary addition works. If I understand it correctly, with two variables e.g. x and y you add a ...
0
votes
1answer
106 views

BCD to Gray code converter

The task is to design a bcd to gray code converter. The 5-bit bcd input is represented as A,B,C,D,E while the 4-bit gray code output as D3, D2, D1 & D0. Could someone help me confirm my truth ...
5
votes
4answers
2k views

Memory capability and powers of 2

Why are computer memory capabilities often multiples of a power of two, such as 2^10 = 1024 bytes? I think it is something related to the binary logic, but I do not understand the precise reason for ...
0
votes
1answer
53 views

What is the circuit's logic diagram of a (2-bit binary to decimal) encoder

To give a sense of what I am looking for ... this is a the circuit's logic diagram of a 4-bit binary to decimal encoder. Here is its truthtable Now, What is the circuit's logic diagram of a 2-bit ...
-1
votes
1answer
152 views

Circuit: Balanced Gray code => Binary?

I've designed a circuit that accepts a standard gray code as an input and converts to binary. However, I am needing to perform the same conversion (to binary), but with a balanced gray code as the ...
0
votes
2answers
94 views

K-maps for forming 8bit binary to 8bit BCD digital circuit

I have been trying to convert 8bit binary to 8bit BCD. The circuit I have been working on is below: I built a 4bit binary to 5bit BCD converter using a similar truth table like the one here: Do I ...
0
votes
0answers
18 views

avoid synthesizing priority encoder for onehot to binary conversion module

For https://github.com/jbush001/NyuziProcessor/blob/master/hardware/core/oh_to_idx.sv#L40 , why use OR operation to avoid synthesizing priority encoder ? if DIRECTION != "LSB0" and NUM_SIGNALS isn'...
0
votes
1answer
40 views

How to know when the resault of subtraction is incorrect in a 4 bit binary subtraction circuit? [closed]

This is an image of a binary subtractor for unsigned numbers. Some times the output of binary subtraction is not correct and needs to be complemented to give the correct answer, how can I find out ...
1
vote
0answers
44 views

Decimal addition using a different BCD WEIGHTED CODING

The problem that I'm having trouble in understanding is how the addition of two decimal numbers such as 17 + 4 can be represented using the weighted BCD CODE, [7 4 -2 -1] and binary addition ...
0
votes
1answer
51 views

Successive approximation conversion

Can someone explain me from the following table on how to get the DAC output.
0
votes
3answers
80 views

Binary subtraction machine

In the book CODE, there is a chapter on binary subtraction circuit. First, it tells us how to subtract two binary numbers. The steps are (the example is for 8 bit numbers) Subtract the subtrahend ...
1
vote
1answer
103 views

VHDL initialize vector using readable integers not long binary string

So I am only starting out my VHDL journey. One thing I am finding a bit of a nuisance is the following format: signal sig_A : unsigned (3 downto 0) := "0101"; ...
-1
votes
1answer
141 views
0
votes
1answer
49 views

Number systems and binary [closed]

I am new to number systems and binary. Can someone tell me why is X>=11 and Y>=6 in this problem? Can someone also explain how the values X=12 and Y=16 are obtained from the conditions shown in the ...
0
votes
2answers
180 views

Building a BCD to 7-segment using 3x8 decoder

So.. I know how to build a BCD to 7-segment using 3x8 decoder but the question provides 4-digit binaries and asks to only input 3 of those.. my question is that won't two different digits be regarded ...
1
vote
1answer
389 views

Multiplying signed to unsigned binary numbers in verilog

How can I multiply a signed number to unsigned number in verilog for example: a = 6'b111111 ; //which is means -1 as it is signed b = 6'b111111 ; //which is means 63 as it is unsigned I want the ...
0
votes
1answer
78 views

How do I convert 1/3 to signed float 8 bit?

The formula is as follows: (-1)^[signed bit] * (1.[significant bit]) * (2^[excess bit -3]) or (-1)^[s] * (1.[f]) * (2^[x-3]) It is a question posed by my signals and systems instructor, hence the ...
-1
votes
1answer
158 views

How to design a multiplier using only multiplexer?

I am asked to make a multipier that takes a three bits input $$x=(x_1, x_2,x_3)$$ and a control signal \$s\$ so that the results will be a hexadecimal 4 bit number $$z=(z_3,z_2,z_1,z_0)$$ such that \$...
1
vote
2answers
666 views

A circuit to convert 4-bit Gray numbers to BCD

I'm sorry for asking this specific question here but can some one please tell me what's wrong with this solution. Question: design a circuit to convert 4bit Gray numbers to BCD I have to say I ...
-1
votes
3answers
159 views

Why does a full adder need an OR gate?

I have read and I understand how the full adder works (or atleast I think I do :D). It combines two half adders and either one of them can have a carry over, hence the OR gate. But why do we need ...
1
vote
3answers
414 views

When adding binary numbers, how do you just ignore the overflow?

So lets say I used 2's complement to put -17 in binary and then I added it to +27, e.g.: ...
0
votes
1answer
40 views

Do binary numbers move in sequence ones and zeros or parallel at once to ALU for addition?

Do binary numbers move in sequence ones and zeros or parallel at once to ALU for addition, I mean ones and zeros in sequence vertically to ALU or parallel horizontally AT ONCE?
0
votes
1answer
267 views

How do I make a double dabble circuit with logic gates

Im attempting to make a 8 bit binary calculator that displays on multiple seven segment displays. Can double dabble be done with logic gates. If so, how?
1
vote
2answers
52 views

Addition and subtraction of binary digits

I have to solve the following exercise : Extend the circuit of the first part (the first part was an adder of integer numbers of 2 binary digits) in order to execute addition and subtraction of ...
0
votes
1answer
372 views

How can I convert binary into multiple 7 segment displays [closed]

I've been trying to make a decimal calculator using binary adders that feed into 3 x 7 segment displays. I cant find an efficient way to do this. If someone could point me to the correct resources, or ...
0
votes
2answers
170 views

How to get the MSB into a logic gate which will check if a number is negative or not?

I need to create a logic gate which will find out whether a number is negative or not. The input is 8 bits and the output is 1 bit, and if the input is 1 (i.e. negative number) then the output ...
0
votes
1answer
356 views

How to find out if the input of a logic gate is negative in two's complement?

I'm trying to create something which will output whether the input of the logic gate is a negative number or not in two's complement. I understand how twos complement works etc, but i'm not entirely ...
0
votes
3answers
105 views

How to find out if a binary number is zero or not using logic gates?

I'm trying to put some logic gates together which would perform a task of finding out whether a number is zero or not. I came across a thread like this on here already (How to find out if a binary ...
0
votes
2answers
157 views

subtracting binary numbers using 2's complement [closed]

Is it usually to not have a carry in the two's complement method for subtracting two binary numbers when we subtract a large number from small one ?
1
vote
1answer
696 views

Subtracting a larger binary number from a smaller binary number

Is it possible to subtract a larger binary number from a smaller one column wise . For example subtracting 1000 from 0111 ? I always use the 2s complement but is it possible to do it column wise ?
-2
votes
1answer
2k views

Difference between Full Adder, Parallel Adder and Ripple Carry Adder?

I am a student and i cannot find any prominent difference between the full adder, parallel adder and ripple carry adder. The full adder for n-bit number requires n full adder cascaded, so as the ...
3
votes
1answer
1k views

4-bit binary multiplier circuit

I have made this 4-bit binary multiplier circuit, but the product of, for example: B3B2B1B0 (1100) x A3A2A1A0 (0001) = P7P6P5P4P3P2P1P0 (00101000) and not 1100, What have I done wrong?
0
votes
1answer
113 views

Convert analog voltages to digital using 5 Volt 4bit ADC

Computer Science major here, I have some idea but not really sure about it. I have a bunch of analog voltage readings. I need to convert them to digitized values (in volts). I am getting a 'Digital ...
3
votes
3answers
115 views

sequencing binary numbers

Is there a method for sequencing 4-bit binary numbers, where no 4 consecutive bits are repeated anywhere else in the stream? For example; Is there a method that would work for 5 and 6 bit numbers? ...
0
votes
3answers
95 views

Measuring a binary number with maximum electrical certainty [closed]

I want to be sure, with arbitrary precision (let say, for example, with 10^-100 certainty), that I can check the following statement (in binary): x = 49 That is, I want to check that a number that ...
0
votes
0answers
51 views

Ladder Logic BCD Communications

I have a very limited number of outputs available (4 to be exact) on my existing PLC and need to share 5-7 bits of information to another PLC without having the expense off add-on communication cards. ...
1
vote
0answers
84 views

LED-Monitor-Firmware reverse engineering / disassembly => replace manufacturer startup logo

I have a display from a disassembled led-monitor (Wortmann Terra 2446W), that I want to use for a SmartMirror-project. Unfortunately, the monitor shows a big manufacturer logo when connected to power, ...
2
votes
0answers
369 views

A curious 433 MHz signal to decode

I bought a cheap set of remote controlled power sockets and I want to integrate them into my home automation system. So I got a 433 MHz receiver for 1€, connected it to my Arduino and tried to decode ...
6
votes
5answers
772 views

How is binary data 'split'?

If one computer sends data, for example 001101, how does the other computer know, where one bit starts and the other one ends? If you were just to monitor the change, you would get 0101, which is ...
0
votes
2answers
74 views

How a Computer Represents a Number Electronically

I understand how computers represent decimal numbers using binary. I have yet to absorb this video on how computers add numbers, which looks helpful. Before understanding that though, I would like to ...
0
votes
2answers
112 views

SN74HC595N Seems to misread bits

A prenote; I'm not sure if this falls more into electronics or Arduino, but I think Shift Registers are more so electronic and binary related. I'm using a single SN74HC595N shift register connected ...
0
votes
2answers
81 views

Infinitely expandable binary decoder circuit

I tried to make some binary to decimal decoders, but I had no idea how to build them, so I ended up using the "combination checker" (basically providing one checker for each number). That was really ...