Write a matlab function for operation of a half-adder

Assignment Help Electrical Engineering
Reference no: EM13246998

Write a MATLAB function the performs the operation of a half-adder, call it half_add. The function should have two inputs, a and b, and return two outputs, X and c. Then, write another function, call it full_add, that invokes half_add to perform the operation of a full adder. The function full_add should have three inputs, a, b and c_in, and return two outputs, s and c_out. Finally, write a program that uses the function full_add to find and display s and c_out for each possible combination of a, b, and c_in.

Reference no: EM13246998

Questions Cloud

How many atoms are found inside a unit cell of simple cubic : How many atoms are found inside a unit cell of a simple cubic, body-centered cubic, and faced-centered cubic crystal How far apart interms of lattice constant a are nearest neighbor atoms in each case, measured from center to center
What is the standard deviation of the sample mean : What is the probability that the interpupillary distance for a randomly selected male will be between 64 and 67 mm and What is the standard deviation of the sample mean
Write the test bench code to test the design : Write the verilog code for a circuit that counts the number of 1s in a byte. Write the verilog code using a structural approach based on four Half-Adders, two 2-bit adders and one 3-bit adder. Write the test bench code to test the design.
Calculate speed if load torque is reduced to three times : The DC shunt motor is running at full load with a supply voltage of 440 V and a supply current of 70 A. The rotation speed in full load is 1000 rpm, the field resistance is 200 Ohm and the armature resistance is 0.2 Ohm.
Write a matlab function for operation of a half-adder : Write a MATLAB function the performs the operation of a half-adder, call it half_add. The function should have two inputs, a and b, and return two outputs, X and c. Then, write another function, call it full_add, that invokes half_add to perform
Find the period of the orbit : An earth satellite is observed to have a height of pergee of 210 Kilometers and a height of apogee of 1,200 kilometers. Find the period of the orbit
Determine the satellites orbital period : Find the speed of a satellite moving in a circular orbit just above the surface of Mars. Mars has a radius of 3.40 106 m and a mass of 6.42 1023 kg
Compute the standard error of the proportion : Compute the standard error of the proportion and calculate the z-statistic. What is the probability of obtaining this value of the z-statistic if the null hypothesis is true?
Determine the total energy stored in the battery : A 9 V battery is rated at 80 Ah. It can deliver a current of 80 A for one hour, or a current of 40 A for 2 hours, etc. What is the total energy stored in the battery

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Determine what is the gage pressure in the tank

The gauge pressure on an air tank is measured to be 250 kPa at the surface of the water. Take the atmospheric pressure to be 100 kPa. The density of water is 997 kg/m3. a) What is the absolute pressure in the tank at the surface

  Find all values of alpha such that the system is stable

Find all values of alpha such that the system is stable for K = 2. If the unity feedback closes around this G(s) and an input is a unit step r(t) = 1u(t), what is the stead-state error, e_ss, as a function of alpha and K?

  Calculate the rated armature current

A 240kW 500V 1750 r/min separately excited dc generator has an overall efiiciency of 94%. The shunt field resistance is 60 ohms and the rated current is 5A. The I^2 R loss in the armature is 0.023 pu.

  What is the power level entering the first active stage

What is the power level entering the first active stage of the receiver at 1900 MHz being fed by a 25 meter coax with a loss of 20 dB/km, given that the Isotropic Receive Level is -134 dBW and the receiving station has a 1 meter radius dish

  Determine the noise on the output as percent fs

A system is needed to measure flow, which continuously cycles between 20 and 30 gal/min with a period of 30 sec. The required output is a voltage varying from -2.5 to +2.5 V for the cycling flow range. The sensor to be used has a transfer function..

  Show the optimal expected number of packets

Note that after a collision, the expected numbers are slightly different in two systems, but the difference is unimportant since collisions are rare.

  Finding out the op level from an attenuator of know ip

Determining the o/p level from an attenuator of know i/p, An attenuator has an attenuation of 10 dB over the frequency range 10 MHz to 1.0 GHz

  Define what is the maximum allowable value xmax

What is the maximum allowable value Xmax of X? The system is built with X-Xmax. An engineer argues that the host on the sort side of the bridge can use a minimum frame length shorter than 512 bits if they are talking to other hosts on the same sid..

  Define frequency divider

Important information about Frequency Divider, Design a frequency divider circuit that will output three pulse frequencies: 25 kHz, 10kHz, and 2.5kHz. Assume that only a 150 kHz CMOS compatible signal is available for the divider input

  What should be the filter''s passband cut-off frequency

What should be the filter's passband cut-off frequency?(DSP Question).

  Design a 4-bit binary incrementer using half-adders

Design a 4-bit binary incrementer using HALF-ADDERS as building blocks. The circuits implements A+1=S where A and S are 4-bit binary numbrers. The circuit has 4 inputs A3A2A1A0 and 5 outputs : S3S2S1S0 and overflow C4. Draw the circuit diagram wit..

  What is the name of the most common insulating material

1. Provide 3 ways for creating proto-types of an electronic circuit. 2. Explain briefly, in outline form, and in your own words, the procedure for creating a single-sided, PCB (Printed Circuit Board), using the etching procedure.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd