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

  Which two fuses will be damaged and other two not

(a) a circuit in which one fuse will be damaged and other three not, after making all connections as per you schematic and connecting power supply (b) a circuit in which two fuses will be damaged and other two not,d connecting power supply

  Create a program using asmide

Create a program using AsmIDE, which utilizes the Fox 11 68HC11 microcontroller board: Speech timer where max time is 5 minutes Use the switches for:

  How to write a subroutine in assembler for the hcs12

In and Th are inputs and Out is the result. All parameters are 8-bit unsigned integers. A typical calling shows that the two inputs, In and Th, are passed on the stack and the return parameter Out, is returned in RegB.

  Calculate the average torque and maximum torque

When the two windings are connected to a a.c supply of 50hz, the field current is 0.1A, the armature current is 100A and the phase difference between them is 60 degree. calculate the average torque and maximum torque.

  Define knowledge about circuit analysis

Knowledge about Circuit Analysis, A 5.1K resistor is connected between the cathode of a 6.2V zener diode and a 12V power supply

  How to design a phase-lead compensator

placing the compensator or zero such that it will cancel the open-loop pole at -1. For both compensators you design, show the corresponding closed-loop transfer functions and compare the transient responses (P.O. and Ts).

  Explain baseband digital trnamission and multi level coding

Baseband digital trnamission and multi level coding, A baseband digital data link transmits polar binary NRZ current pulses at a rate of 1.0 Msps. The link uses ideal RRC filters with roll off factor r = 0.5.

  Find the tension in the rope

A newly planted tree is supported against the wind by a rope tied to a stake in the ground. The force of the wind, though distributed over the tree, is equivalent to a single force F. Find the tension in the rope

  Which configuration then would have higher input impedance

The input impedance of a JFET used in COMMON SOURCE configuration, is defined by two considerations: The JFET itself has a VERY HIGH INPUT IMPEDANCE, because the input is the GATE to SOURCE junction that is REVERSE biased

  What word length is required for an adc

What is the resolution of an ADC with a word length of 12-bits and an analogue signal input range of 100 V A sensor produces a maximum analogue output of 5V. What word length is required for an ADC if there is to be a resolution of 10mV

  Determine minimum amount of water in gallons it must hold

The plant contains six 288MW generators. Given the overall facility efficiency is 76%, and the plant is capable of full output for a duration of 5 hours, determine the potential energy of upper reservoir and the minimum amount of water in gallons ..

  Write a program that calculates the quadratic equation

write a program that calculates the quadratic equation. the program should be able to compute imaginary numbers (i.e. sqrt(-1)). finally, output the tow result. hint: the computer cannot directly compute imaginary numbers

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