Write function printbinary that displays the number of bits

Assignment Help Electrical Engineering
Reference no: EM13281312

Write a function printBinary() that displays the number of bits used VB2010. Using 'sizeof()' if the user enters and int 17 the function should display 000000000000000000000000000010001.
1- Initialize and unsigned int variable mask, with a value whose binary representation has a 1 followed by zeros.
2- For a counter running from 1 thru the number of bits
a. If the bitwise-and (&) of the given integer and mask is non zero: Display 1 Else Display 0
b. Shift the bits in mask one position to the right using >>.

Reference no: EM13281312

Questions Cloud

Cost information for the technology : What is a current commercially available or theoretical technology that can be used to produce electricity on-site from a sustainable source. For example, you might find a commercially available product that generates electricity using a geothermal s..
Compute the discounted payback statistic for project x : Compute the Discounted Payback statistic for Project X and recommend whether the firm should accept or reject the project with the cash flows shown below if the appropriate cost of capital is 13 percent and the maximum allowable discounted payback..
Determine what is the value of kp for the reaction : The reaction below has a Kc value of 1.0 × 1012. What is the value of Kp for this reaction at 500 K. 2 SO2(g) + O2(g) 2 SO3(g)
What is the fundamental frequency of this pipe : A pipe open at both ends has a fundamental frequency of 120 Hz. what is the fundamental frequency of this pipe
Write function printbinary that displays the number of bits : Write a function printBinary() that displays the number of bits used VB2010. Using 'sizeof()' if the user enters and int 17 the function should display 000000000000000000000000000010001.
What are major skills for disaster management : what are Major Skills for Disaster Management? explain briefly with source
Determine the power output of the sun : the surface of the sun has a temperature of about 5800 k. if the radius of the sun is 7 x 10^8 m, determine the power output of the sun
Describe osborne’s current leadership style : Why had Osborne’s department been so successful even though he has provided little leadership over the past two years? 2. How would you describe Osborne’s current leadership style?
Use the payback decision rule to evaluate : The required rate of return on projects of both of their risk class is 12 percent, and that the maximum allowable payback and discounted payback statistic for the projects are 2 and 3 years, respectively.

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Design a schmitt trigger circuit that has a window of 5v

Use rail voltages of +/-15V. Sketch the circuit diagram and the voltage transfer characteristic (Vout vs Vin) Discuss how you chose the values of the components and comment on how accurately you think you can achieve the specification.

  Write program that reads in a list of integers into an array

write a program that reads in a list of integers into an array with base type int. you may assume that there are fewer that 50 entries in the array. your program determines how many entries there are. the output is to be a two column list.

  Which every chord lies above the a strictly convex function

A strictly convex function is defined as one for which every chord lies above the function. Show that this is equivalent to the condition that the second derivative of the function be positive.

  Define nmos fet and bjt analysis

A standard silicon NPN BJT is to be used as an amplifier. The emitter voltage is biased at 4 volts, the base is biased at 5 volts, and the collector is biased at 10 volts. Will this circuit perform as desired? Why or why not.

  Find voltage across the coil and the capacitor in phase form

A series resonant circuit has a resonant frequency of 10 kHz. The resistance of the circuit is 5 ohms and Xc at resonant is 200 ohms. a. find the bandwidth. b. find the cut-off frequencies. c. find Qs. d. if the input voltage is 30V

  What is the electron concentration and conductivity

a) A Si is doped with 10^17 boron atom/cm3. What is the electron concentration n0 at 300K. What is conductivity. b) A Ge sample is doped with 3x10^3 Sb atoms/cm3. Using the requirements of space charge neutrality

  Find what is the direction of the torque on the loop

A loop of current is placed in the xy plane in a uniform magnetic field in the positive x direction. If the current in the loop is in the clockwise direction, what is the direction of the torque on the loop

  Show k-maps that reduce the total number of gates needed

F(A,B,C,D)=Σ(0,2,3,4,6,7,10,11) and G(A,B,C,D)=Σ(0,4,8,9,10,11,12,13) Consider that the functions are to be implemented as part of the same circuit. Show k-maps that reduce the total number of gates needed. How many gates are required

  Find the total charge within the sphere

A spherical region defined by 0

  Find the received power if the transmitted power is given

find the received power (in W) if the transmitted power is 100 W, the distance of the dipole from the transmitting and receiving antennas is 100 m, the gain of the transmitting and receiving antennas is 15 dB each, and the frequency of operation i..

  Determine the high-pressure turbine work per unit mass

The temperature of steam at the inlets of both turbines is 500°C, and the enthalpy of steam is 3185 kJ/kg at the exit of the high-pressure turbine, and 2247 kJ/kg at the exit of the low-pressure turbine. Disregarding the pump work, determine the w..

  Plot the spectrum and the normalized spectrum of x

a) Plot the spectrum and the normalized spectrum of x[nT] = 2cos(20*pi*n*T + pi/8) + 4cos(40*pi*n*T + pi/8) for T = 0.01 b) Plot the spectrum and the normalized spectrum of

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