Question

In: Computer Science

a. Design a binary-to-octal converter. b. Design a logic circuit by which the following arithmetic expression...

a. Design a binary-to-octal converter.
b. Design a logic circuit by which the following arithmetic expression can be calculated and show how X = 9 - 5
c. Write a short note on the data distributor circuit.

Solutions

Expert Solution

a. Binary to octal in java.

public class BinaryOctal{  
   public static void main(String args[]){  
        /* To take input from user, import the java.util.Scanner
         * package and write the following lines
         * Scanner scanner = new Scanner(System.in);
         * System.out.println("Enter the number: ");
         * int bnum = Integer.parseInt(scanner.nextLine(), 2);
         */
        String number = "10101";
        int binarynum = Integer.parseInt(number, 2);
        String octal = Integer.toOctalString(binarynum);
        System.out.println("Octal Value after conversion is: "+octal);
   }
}

b.ans..

The three main ways of specifying the function of a combinational logic circuit are:

  • 1. Boolean Algebra – This forms the algebraic expression showing the operation of the logic circuit for each input variable either True or False that results in a logic “1” output.
  • 2. Truth Table – A truth table defines the function of a logic gate by providing a concise list that shows all the output states in tabular form for each possible combination of input variable that the gate could encounter.
  • 3. Logic Diagram – This is a graphical representation of a logic circuit that shows the wiring and connections of each individual logic gate, represented by a specific graphical symbol, that implements the logic circuit.

and all three of these logic circuit representations are shown below.

c. short note on the data distributor circuit.

Ans..The data distributor, known more commonly as a Demultiplexer or “Demux” for short, is the exact opposite of the Multiplexer we saw in the previous tutorial.

The demultiplexer takes one single input data line and then switches it to any one of a number of individual output lines one at a time. The demultiplexer converts a serial data signal at the input to a parallel data at its output lines.

Some standard demultiplexer IC´s also have an additional “enable output” pin which disables or prevents the input from being passed to the selected output. Also some have latches built into their outputs to maintain the output logic level after the address inputs have been changed.

However, in standard decoder type circuits the address input will determine which single data output will have the same value as the data input with all other data outputs having the value of logic “0”.

The implementation of the Boolean expression above using individual logic gates would require the use of six individual gates consisting of AND and NOT gates.

The digitally controlled analogue switches of the demultiplexer select an input resistor to vary the value of Rin. The combination of these resistors will determine the overall voltage gain of the amplifier, (Av). Then the voltage gain of the inverting operational amplifier can be adjusted digitally simply by selecting the appropriate input resistor combination.

Standard Demultiplexer IC packages available are the TTL 74LS138 1 to 8-output demultiplexer, the TTL 74LS139 Dual 1-to-4 output demultiplexer or the CMOS CD4514 1-to-16 output demultiplexer.

Another type of demultiplexer is the 24-pin, 74LS154 which is a 4-bit to 16-line demultiplexer/decoder. Here the individual output positions are selected using a 4-bit binary coded input. Like multiplexers, demultiplexers can also be cascaded together to form higher order demultiplexers.

Unlike multiplexers which convert data from a single data line to multiple lines and demultiplexers which convert multiple lines to a single data line, there are devices available which convert data to and from multiple lines and in the next tutorial about combinational logic devices, we will look at Encoders which convert multiple input lines into multiple output lines, converting the data from one form to another.


Related Solutions

Problem Statement: Design a combinational logic circuit that meets the following specifications: • Input: 3-bit binary...
Problem Statement: Design a combinational logic circuit that meets the following specifications: • Input: 3-bit binary integer (A), 2-bit binary integer (B). • Output: 5-bit binary integer (X) = (AxB). For example, A=6, B=2, X=6x2=12. Notation: • A=(A2,A1,A0) • B=(B1,B0) • X=(X4,X3,X2,X1,X0) Required Output: Show the truth table and a minimal logic expression for each of the outputs. Also, draw a logic diagram using discrete gates. Extra Credit: Redesign by using multiplexers and minimal discrete logic as appropriate. 1 |...
1. Design a combinational logic circuit that converts 4 bits binary to gray code 2. Design...
1. Design a combinational logic circuit that converts 4 bits binary to gray code 2. Design a combinational logic circuit that converts gray code to 4 bits binary 3. Design a combinational logic circuit that converts 4bits 2421 to excess 3 code
Draw the binary tree representation of the following arithmetic expression: "( ( ( 6 + 3...
Draw the binary tree representation of the following arithmetic expression: "( ( ( 6 + 3 ) * ( 3 - 2 ) ) / ( ( 3 + 10 ) + ( ( 8 - 3 ) - 2 ) ) * 9 )" -Give an O(n)-time algorithm for computing the depth of all positions of a tree T, where n is the number of nodes of T.
Design a combinational circuit that implements a Binary-to-Grey Code converter. Your input should be a four-bit...
Design a combinational circuit that implements a Binary-to-Grey Code converter. Your input should be a four-bit binary number, and your output should be the equivalent four-bit Grey Code value. First, design the circuit using NAND gates only. Next, design the circuit using a minimal number of 2-input XOR gates.
Design and implement a binary-encoded sequential circuit subject to the following specifications.   This circuit is going...
Design and implement a binary-encoded sequential circuit subject to the following specifications.   This circuit is going to be used to control access to security system. It has a single 2-bit wide input, called X = X1X0 that represents a key-pad that is capable of accepting numbers 0 to 3, representing digits of a passcode. It has a single 1-bit wide output, called F, that is attached to the disarming mechanism. The behavior is that if the correct passcode is entered...
Convert the following decimal number into (a) binary and (b) Octal (SHOW ALL STEPS) 205.75
Convert the following decimal number into (a) binary and (b) Octal (SHOW ALL STEPS) 205.75
Design a transducer to convert a binary string into octal. For example the bit string 001101110...
Design a transducer to convert a binary string into octal. For example the bit string 001101110 should produce 156. Please complete the code to account for the 7 cases of 3 digit binary strings. //Function binaryToOctal takes a char array digits of length 3 //Pre: digits contains 3 binary digits. //Post: function returns the octal number equivalent to the 3 binary digits int binaryToOctal( char digits[], int 3){ int number; if(digits[0]=='0') if (digits[1]=='1') if (digits[2]=='0') return 2;//found "010" else return...
Design a logic circuit that takes 2-bit input A and 2-bit input B and subtracts the...
Design a logic circuit that takes 2-bit input A and 2-bit input B and subtracts the two numbers using full adders and inverters with full adders diagram, which input is subtracted dos not matter.
Convert binary to the following 100110101.1011101101)2 a.) Octal ( )8 b.) Hexa  ( )16 steps would be...
Convert binary to the following 100110101.1011101101)2 a.) Octal ( )8 b.) Hexa  ( )16 steps would be helpful thanks
gray code to excess 3 code converter circuit and its logic diagram and ic based diagram
gray code to excess 3 code converter circuit and its logic diagram and ic based diagram
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT