answersLogoWhite

0


Best Answer

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity mux2x1 is

Port ( i : in STD_LOGIC_VECTOR (1 downto 0);

s : in STD_LOGIC;

y : out STD_LOGIC);

end mux2x1;


architecture df of mux2x1 is

begin

with s select

y<= i(0) when '0',

i(1) when '1',

'0' when others;

end df;

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is VHDL program for 2 to 1 multiplexer?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the basics of VHDL?

VHDL is a hardware description language. You can describe the hardware in three different ways using VHDL. 1. dataflow model 2. behavioral model 3. structural model


How do you construct half adder using 2 1 multiplexer?

Use the multiplexer to choose the correct output based on the inputs (use the truth table).


What is a vhdl gold model?

Vhdl has got three models - programming styles. 1. data flow model 2. behavioral model 3. structural model.


How Design a 3 input AND gate using 2 by 1 Multiplexer only?

help


How can you implement an 8 to1 multiplexer by using two 4 to1 multplexers?

You don't need two 4-to-1 multiplexers. You only need one 4-to-1 multiplexer, and something that functions as a 2-to-1, like a single 2-input OR gate with one input grounded.


How can you write a VHDL code for full adder using two half adders?

Since a fulladder can be obtained by using 2 halfadders &amp; 1 OR gate.....so we have to call an halfadder program as well as an OR program......this can be implemented easily with the help of structural model rather than dataflow and behavoioural model


What is vhdl code for 2 bit sliced processor?

library ieee;


You want vhdl based mini project for electronics?

1)Home Security based system 2)ROM Based Sine wave


Explain MUx constract a 16-to-1 line multiplexer with two 8-to-1 multiplexer and one 2-to-1 line multiplexeruse block diagram for the three multiplexers?

Jo MUX hai wo circuit ki tarah karya karta hai. adhik jankari ke liye csa ki book search kre. Deepak Shukla. Duble MCA-


How many 2 input multiplexers are required to construct a 1024 input multiplexer?

15 2 bit multiplexers


Construct a 16-to-1-line multiplexer with two 8-to-1-line multiplexers and one 2-t0-1-line multiplexer?

Type your answer here... D0-D7 on 1st 8to1, D8-D15 on 2nd 8to1, S0,S1,S2 to both. The output from 1st 8to1 is D0 on the 2to1, the output from the 2nd 8to1 is D1 on the 2to1 and S3 to the 2to1. The 2to1 provides the final 16to 1 mutiplexed output, OK?


What is a Certificate Program?

A certificate program is 1-2 year program that you can take after you graduate college.