# 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.

234 questions
Filter by
Sorted by
Tagged with
92 views

### How can I combine 4 separate bits into one 4 bit output?

Say I hypothetically have four switches 0-3. I want each switch to represent a bit in a four bit long number, switch 0 being the first bit and switch 3 being the last. The end goal is to be able to ...
1 vote
67 views

### Why is there a cutoff on these accelerometer measurement values? - ADXL375

I'm using a Teensy 3.2 to read data from an ADXL375 using SPI. In general the communication is going just fine and I can activate settings etc. However, when I try to read X, Y or Z data it seems like ...
44 views

### I know how to do it with K Maps but how to solve it without using them

Let X=X1X0 and Y=Y1Y0 be unsigned 2-bit numbers. The output function F = 1 if X is equal to or less than Y and F = 0 otherwise. Find the minimized expression for F?
67 views

### UTD 2052 oscilloscope: read data from .sav file

I just recently got an oscilloscope and was happy to try it out. Now I have a problem with reading the data. The model I am using is the UTD2052 50 Mhz scope. I can save the data to a USB drive in the ...
71 views

### Boolean function of digital comparator

The boolean equation or function for a binary digital comparator is (A3&~B3)|| (x3&A2&~B2)|| (x3&x2&A1&~B1)|| (x3&x2&x1&A0&~B0). This equation is considered to ...
1 vote
94 views

### Representation of 2 and 7 in 5211 binary code

In 5211 binary code 2 is represented as 0011 and 7 is represented as 1100. My question is why can't we represent 2 as 0100 and 7 as 1011 in 5211 code?
1 vote
23 views

### Capturing overflow in twos complement addition

I am trying to implement 8-bit twos complement addition. I am doing this by splitting the 8 bit inputs into 4 bit parts and then implementing 4 bit complement addition. A well known diagram is where ...
57 views

### Theory of operation of MM74C922N

I have been studying the datasheet of the MM74C922N , a 4x4 matrix keypad, but I cannot seem to understand how it works under the 'Theory of Operation'. I know it outputs a 4-bit binary code depending ...
1 vote
89 views

### Is there a standard way to convert from a fixed point notation to a floating point notation?

Fixed point numbers can be in many different forms depending on the number of bits before and after the decimal expressed as Qm.n. Floating point numbers can be in many forms depending on the number ...
44 views

### How do you algorithmically calculate the booth recoding truth table for different radix?

Basically what I am trying to figure out is how one generates algorithmically the truth table for Booth's recoding for different radices of his algorithm. How would you generalize this into a truth ...
93 views

### Can I have some help compacting this?

I am trying to build a transistor computer, and I want to save as much resources as possible. However, I also want it to be practical, so I am implementing a binary-decimal conversion. In order to ...
1k views

### How does the OV(Overflow flag) of the 8051 work and how does it differentiate between signed and unsigned digits?

If a number is 8 bit, the maximum value it can have is 2^8 or (1111 1111). In the OV flag, the last digit or the MSB decides the sign, but how does the overflow flag know if it is the "signed MSB&...
1 vote
38 views

### Any good resources to practice efficiency of code modulation?

I want some resources to practice code efficiency problems like this: I looked around online and could not find anything. I also looked in two books and only found a section concerning code ...
218 views

### JK Flip-Flop 0-9 up/down counter [closed]

I designed a 4-bit JK up/down counter. I want the circuit to be reset to 0 when counting up when it reaches 9, and to be reset to 9 when counting down when it reaches 0. Anyone know how ? I tried a ...
202 views

Given : ...
114 views

### Logical Bitwise Operations Problem

I am reading data from an IR sensor array (8 sensors) and converting the ADC result to binary via a set threshold. If n is the current result, for example: (N.B: n-1 is the previous result) ...
1 vote
37 views

### How to know whether addition has been done in a parallel binary adder?

I am little new to electronics and getting some high level overview of digital electronics. The question is that how to know whether addition has been performed in a logic circuit. For example I have ...
139 views

### Are carry flags set even when we discard the carry in an arithmetic logic unit?

Currently I am learning simple binary math for a microprocessors course and have a trivial question on signed addition in 2's complement notation. My professor mentioned that when we substract two ...
384 views

### Is it possible to build a binary divider with this design?

So I am working on this ALU, and I have made this 8-bit multiplier based on this design: . Is it possible to adapt this design into a binary divider by using Subtractors instead of Adders, and maybe ...
1 vote
99 views

### Convert a Ngspice rawfile to binary format [duplicate]

I have these NgSpice rawfiles that are generated in ASCII format instead of binary format. I would like to know please what command to use to force their generation in binary instead or ASCII format ...
1 vote
64 views

### How to find what circuitry is required for synthesis of following digital VLSI design problem?

My thoughts: Here price of chocolate is increasing in Geometric progression with common ratio 2 and first term 1, so on nth day price of chocolate will be $T_{n}=2^{n-1}$\ irrespective of wheather ...
103 views

### Conceptual vs real world signal transmission [closed]

When data or information is sent through any medium, (be it through phone lines, cable, fiber optics or through empty space or some other means), is it volts, current of charges, 0s and 1s, codes, ...
701 views

### Is it possible to set starting count on binary counters like CD4020?

Can I set starting count on binary counters like CD4020, CD4060? Only solution I know is to use reset pin and increase the frequency till you get desired count then resume normal operation. If there ...
180 views

### CD4060 with external clock pulse

I am trying to make realtime, low power 1hr audio indicator using binary counters. I don't need display so not using decade counters or 7 segment display ICs. So I bought bunch of CD4060 binary ...
1 vote
445 views

### Converting hexadecimal digit to two's complement

So I have the number 'E' which is 14 in decimal and 1110 in binary. To get the two's complement I first get the one's complement and add 1, so I get: One's complement: 0001 Two's complement: 0010 So ...
35 views

### Using a binary counter with ic sram

I am using the as6c62256 ic sram, this is the datasheet: datasheet I am trying to write 1000 words of 8 bit, and then read them from the sram is it possible to connect a binary counter to the adress ...
82 views

### How do I set a value within an if statement using logic gates? [closed]

I have a value B that I want to set if a variable A = 1. I know how to create the if statement by applying an AND gate on a 1 constant and A, but how do I set B within that if statement using logic ...
91 views

### How do I create a 1-bit full adder that outputs a 2-bit sum?

I am trying to build a 1-bit full adder that outputs a 2-bit sum. I know that the standard 1-bit FA outputs a 1-bit sum and a carry bit, but I was wondering how can I modify the FA such that the carry ...
108 views

### Assigning binary value to decimal value using counter [closed]

I don't know muach about verilog, but i started to study it lately. So if these codes doesn't make sense at all, forgive me :D I am writing a verilog code for Sinus lookup table. for instance, ...
372 views

### How does a repeater convert light from a fibre-optic cable into binary?

I'm just starting out in Computer Science and currently learning about transmission of data in fibre-optic cables. I understand fibre-optic attenuation and that a repeater will then take this light ...
209 views

### Why is it easier to implement bytes as 8 bits rather than 9 bits? [duplicate]

From book to book I always find the same sentence. For example: 8 bits is an even power of 2, which makes it somewhat easier to design computer hardware with 8-bit bytes than with 9-bit bytes. ...
1 vote
76 views

### Verilog project - Binary to BCD - 0-49 2 digit display

I have an end of the year project where I must create an 4 operation ALU that outputs its result onto 7 segment displays in Verilog. 2 of those operations are multiplication and addition. Considering ...
542 views

### 32 bit to 7 segment display (FPGA)

After some research, I think I have quite a problem on my hands. I have a project on an FPGA where I store a 32 bit binary value in a 32 bit memory register. The stored value ranges from 0 to 4000 in ...
122 views

### Multiplying twos complement binary numbers

I have a project where I am developing a basic processing core on a FPGA from logic gates. So of course I have an ALU that I am building out of logic gates. I have no issues with the rest of the ALU ...
1 vote
137 views

### How to make a LED bar display a binary value?

I have a 5-bit binary number from 0 to 11110 (30 decimal). I want to display it in a led bar using "bar" mode. It means that if the number is 10000 (see the picture below) I want ALL 16 leds ...
1 vote
126 views

### How two or more consecutive zeros(off) or one (on) in digital circuits are recognized?

So digital circuits work by using two states either on or off , and i was wondering how two consecutive bits of zero(or one) be identified? is there like a timing circuit or anything like that?
48 views

### Chip Operation Mode selection in binary

For my project, I would like to design my own SATA->USB-C adaptor. For this, I'm using the Odroid schematic (here), and also the schematics of Cubieboard (here). My question is about the JMS539 ...
1 vote
190 views

I am just a newbie starting out in electronics with no experience. Why do we need XOR and AND gate for the binary adder? is there any particular reason why only these two specific gates are needed ...
1 vote
224 views

### Why does my synchronous up counter count enable not function properly?

I have designed a simple 4-bit synchronous up-counter, using master/slave JK flip flops in Logisim. Here is my JK design: And my counter design: It works perfectly as intended, however if the INC (...
60 views

### Binary Data encoding and decoding format

I am trying to understand what is the meaning of this data coding format as shown in the following image. It is not simple binary to decimal conversion. Can anyone tell how this conversion formula ...
1 vote
252 views

### Problem with Octal to Binary in VHDL

it,s me... Again. I tried almost everything but i can't make it work properly. This is my code: ...
1 vote
107 views

### What happens when you divide by zero with a binary divider?

I am curious what would happen if you have a number such as 2 (10 in binary) and divide by 0 (0 in binary). What would happen?
1 vote
189 views

### How to find out the used code?

I have a data stream that looks like x\xdam\xdd]\xc4\xeemZ\xc7q)2\xcc\xd6cL\x1a1\x8c\xc9hc\x0c)\xeb^\xaf\xd7Z (...) How can I find out what I do see here? At the ...
170 views

### How to convert from 2s complement values to binary? [closed]

I am trying to build a calculator that can perform addition and subtraction and works like a real calculator(ie, you press the first number, than the operation, then the second number, and press = to ...
40 views

### How to make a binary counter

How do you make it so that a light goes on after a button has been pressed twice then off when pressed twice more? I'm pretty stumped on this one and searches don't yield results. Any help is much ...
1k views

### Is it possible to make a circuit that can convert binary to decimal?

I know that computers use binary to calculate instructions and perform tasks. But essentially no one I know can convert binary to decimal. I am working on a calculator project currently, and the ...
189 views

### offset binary from ADC to Decimal

Im trying to read data from ADC with ADC Inteface Im designing with FPGA. The data that coming out from the ADC is offset binary with 12 bits.. looks like that: I want to simulate this results using ...
147 views

### Binary Manipulation in arduino with 74HC595

I'm doing practice of bit manipulation in arduino with a 74HC595 shift register. I would like to create an algorithm that allows the binary digit to perform this way: 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 ...
1 vote