Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

12
votes
7answers
3k views

ISA opcodes---Where do they come from?

When engineers are designing an instruction set architecture, by what procedure or protocol, if any, do they follow when designating certain binary codes as instructions. For example, if I have an ISA ...
11
votes
7answers
18k views

What are advantages of Two's Complement?

In some ADC/DAC devices their are options to output/input the data in 2's Complement form. What are advantages of representing digital data in Two's Complement form When you can simply have straight ...
10
votes
4answers
2k views

Avoiding confusion between no input and a zero in binary?

Suppose I'm transmitting data through FM where 0 is 2Hz and 1 is 4Hz. The transmitter is transmitting 2Hz when there is no input. If I fed the recieved binary to a UART port of a microcontroller, how ...
8
votes
3answers
3k views

Why is the Gray code called a cyclic code?

I understand why it is called reflexive and a unit distance code. I don't see any cyclic pattern which is repeating in the code. Why is it called a cyclic code?
7
votes
3answers
1k views

check if an unsigned binary number is divisible by 15

I'm a computer science student and I got stuck on this question for hours. We have a binary unsigned number X, represented by 12 bits. We would like to build a system with 1 bit output - Y, that will ...
6
votes
5answers
738 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 ...
4
votes
6answers
1k views

How to deal with signed int overflows

Brief background first; I have data from CAN bus of a steering angle which is obviously in hex. The steering angle covers two bytes of a message. The specification document I have says that those two ...
4
votes
5answers
495 views

How do bitshifts work on the electrical layer?

I'm a software developer and I understand how arithmetic and logical bitshifts work in principle. But how do they work on the electrical layer? I might have a completely wrong imagination; Let's ...
3
votes
4answers
2k views

How much binary data is transmitted across a physical wire in one clock cycle?

How much voltage change, what I'm calling binary data, can be transmitted over a wire at one time in one clock cycle? I understand, I think, binary data is what we call it and the wire doesn't really ...
3
votes
3answers
2k views

Hexadecimal two's Complement

I have this question, which I thought I knew how to do, however my method is wrong somewhere. I converted the numbers to binary, removed 1 then inverted them to get them in normal binary format. I ...
3
votes
3answers
1k views

Converting 32 bit 2's complement to decimal number

I have data coming from a V9261F energy measuring chip (link to datasheet), that sends it data through a UART to my Arduino microcontroller. When I read register 0x0119, I read the active power ...
3
votes
5answers
16k views

How electrical signals converted into Digital (binary 1 0)

I already ask this question in yahoo and in Microsoft........they say that : did I mean to say how to convert analog signals to digital signals.....and they suggest me the theory of AD converter So, ...
3
votes
1answer
362 views

Xilinx bit file different between builds

I'm trying to understand what happens to binary results after building same VHDL sources using Xilinx latest ISE. I have heard conflicting information about the resulting bit/bin files. Is the ...
3
votes
1answer
207 views

Is 2's complement the only way that singed binary numbers are represented?

I have only seen mention 2's complement practically everytime signed number representation is mentioned. However, I have found that there are other ways to represent signed numbers also, these are 1's ...
3
votes
1answer
729 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?
3
votes
3answers
114 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? ...
3
votes
2answers
464 views

Why comparison of biased representation are faster than two's complement?

Biased representation (or excess-N, offset binary) are used for floating number representation in computers. This wiki page says This allows high speed comparisons Could any one explain why ...
3
votes
1answer
105 views

Mathematical Logic behind generating T0 codes

I'm doing a small project in college where I'm required to convert(encoding) between gray and binary codes and also for bus invert coding in verilog. Its a simple task really as I'm done with code for ...
3
votes
2answers
3k views

Why does signed (2's complement) binary multiplication have different procedure than unsigned?

The 2's complement binary multiplication does not have same procedure as unsigned if the both operands do not have the same sign. What is the logic behind that? Does special consideration apply to ...
2
votes
2answers
826 views

How do you do operations on large numbers using a small fixed-width ALU?

I am wanting to design a simple calculator like what you would find in the dollar store. Something like this: This little guy can display a number 8 digits long, meaning 99999999 is the largest ...
2
votes
1answer
12k views

Normalized and denormalized floating point numbers

Regarding the normalized and denormalized representations of binary floating-point numbers (as described in the book by Patterson), I want to know how a denormalized number is really shown. See the ...
2
votes
2answers
2k views

Sending data through lasers

I have to design a circuit in which I have to transfer data through lasers (serial transmission of data). Now what I was thinking was to check if the laser light is on then '1' is passed and when the ...
2
votes
1answer
308 views

A confusion regarding signed representation of binary numbers

Suppose I have an ADC that converts the analog input samples to 4-bit signed binary numbers. The resolution of the ADC is 0.5V. Since the binary o/p is of sign magnitude representation, the MSB has no ...
2
votes
3answers
9k views

How to control the current output from usb slots of computers?

Is it possible to control output from a computer usb port so, for instance if I have a usb led I can make it blink or do whatever with it. Whenever I send a high signal it would glow and whenever I ...
2
votes
2answers
3k views

What is the standard way to represent fixed point numbers in VHDL?

Is there a native type in VHDL language similar to std_logic_vector that allows one to create a signed or unsigned fixed point number for given length of fractional and whole parts? If so, can it be ...
2
votes
2answers
947 views

Why is a 15 stage binary counter/divider so cumbersome?

There seem to be many ways to take a 32.768kHz signal and turn it into 1Hz. I can use a CD4060, but still have to add a flip-flop... so 2 "large" chips with excess (potentially) unused functions ...
2
votes
1answer
146 views

Confusion with calculating the mantissa of a floating point from a binary number

I use this converter to convert a 32-bit binary number to a floating point number. I first find the hexadecimal of the 32-bit binary number and convert to decimal by using the converter. In my case ...
2
votes
1answer
467 views

Binary calculation (11 +01010101 )

Kindly help me with this Binary calculation Add the following 2's complement numbers 11 +01010101 = ? How i solve it : 0000 0011 + 01010101 = 01011000 but the book say its 84??? Please help!...
2
votes
1answer
1k views

Display Double Digit Numbers on 2 seven segment displays

I'm making an Arithmetic Logic Unit(ALU) for an assignment and I'm on a point. So according to my circuit design on the link shared below, I am able to output 1 digit of my alu. It is a 4 bit ALU so ...
2
votes
0answers
311 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 ...
1
vote
3answers
318 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.: ...
1
vote
1answer
1k views

How to multiply fixed point numbers of different format

Assume I have two 16 bit fixed point numbers in following format being multiplied. Q3.13 * Q10.6 What is the correct way to multiply them, i.e do I right shift the first number to align it as Q10.6 ...
1
vote
2answers
374 views

Page table - I don't understand how this table has been made [closed]

CPU has generated this sequence of logic addresses (in decimal): 777, 2047, 1199, 1100, 546, 129, 3201 page size is 512 Byte, ...
1
vote
3answers
543 views

Confusion over binary radix usage and formatting through FIR filter (and circuits in general)

I'm having a bit of a hard time trying to get my head around binary radix's. Specifically when it comes to use them in a circuit. On their own I can understand them fine. For example, 2s complement, ...
1
vote
1answer
206 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 ...
1
vote
2answers
3k views

Which 4-bit Binary Number Is Greater?

My Task I'm working on an extra work question our teacher assigned us from the book. Design a combinatorial circuit that compares two 4-bit unsigned numbers A and B to see whether B is greater than A....
1
vote
3answers
558 views

Is it possible to make decimal computer using binary technology?

I have a question about computer architecture fundamentals. About binary system. Well, I know, computer doesn't use decimal (base 10) system to operate, it uses binary system, because there is a ...
1
vote
2answers
86 views

IC for data redirection

I was just wondering if an integrated circuit exists that would do the following: Has around 10 inputs (8 for 8 bits of data, 1 for output selection and one for output enable) and 16 outputs Will ...
1
vote
2answers
236 views

Does 8b/10b decoding take running disparity into account?

What's unclear to me in reading literature about 8b/10b encoding is how it is decoded. How an 8b word is translated to a 10b symbol clearly relies on the running disparity. But when it comes to ...
1
vote
1answer
104 views

How microprossesor perfoms substration by 2's complement

How microprossesor perfoms substration by 2's complement for 5 + (-3) ? I know this might be basic, but to be honest I didn't get it at all. ...
1
vote
2answers
1k views

Convert ASCII represented HEX into HEX

I have a question which I was unable to solve but it seemed trivial. I am getting a stream of characters from a processor over UART and this stream represents a JPEG file. I captured this stream, as ...
1
vote
4answers
505 views

Has fsk over wired communication channels ever been done?

I have done multiple searches to figure out if fsk encoding of binary data has ever been used in a "wired" communication scheme but have come up with very little. It seems, at least to me, that ...
1
vote
3answers
70 views

Order of data bits

In general when labelling data bits, say for a binary number. If I have four bits to represent such a number and I label them \$\ b1, b2, b3, b4 \$. Should \$\ b1\$ or \$\ b4\$ be the most significant ...
1
vote
2answers
2k views

Why is a binary system used instead of decimal system when interpreting voltages? [duplicate]

In physical computing, binary is used to perform calculations. Typically, 1 corresponds to high voltage (3V-5V), and 0 corresponds to low voltage (0V-2V). Perhaps it is not feasible due to the ...
1
vote
1answer
59 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
vote
1answer
127 views

Dual JK Flip-Flop Toogle Feature

I'm trying to make an 8-bit Display using 4 seven segment displays being driven by a single EEPROM (like in this video). From the video, I used the design of the 555 timer and a dual JK flip-flop to ...
1
vote
2answers
6k views

Initializing a large bit number as zero

Is there a more efficient way of registering an initial value for a variable than reg [3:0] COUNT = 4'b0000; where in this case if I were to define say a 32-...
1
vote
4answers
169 views

Create binary sequence to use less inputs

Let's say I have 63 buttons, but there are only a few inputs on Arduino. I want to know which one was pressed. To minimize the number of inputs used, I could tell from a binary sequence. If I press ...
1
vote
1answer
302 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 ?
1
vote
1answer
539 views

Assembler basic question : translation to machine code

How does a assembler (at very basic level) work in translation of Assembly language to machine code ? [What my understanding is that when a Programme is written it is written in text and then ...