TutorMe homepage
Subjects
PRICING
COURSES
Start Free Trial
Sunny S.
final year engineering student
Tutor Satisfaction Guarantee
Basic Math
TutorMe
Question:

x is an integer and 9 < x2 < 99. What is the maximum value of x minus the minimum value of x?

Sunny S.

9 < x2 < 99 Take the square root of all sides. Now when you take the square root of a number you get a positive and a negative root: √9 = ±3 and √99 ≅ ±9.95. This produces two intervals for x: -9.95 < x < -3 and 3 < x < 9.95 Since x is an integer, its maximum value is x = 9 and its minimum value is x = -9 (Max Value of x) - (Min Value of x) = 9 - (-9) = 9 + 9 = 18

Arduino Programming
TutorMe
Question:

how to fade an LED on pin 9 using the analogWrite() function. The analogWrite() function uses PWM, so if you want to change the pin you're using, be sure to use another PWM capable pin. On most Arduino, the PWM pins are identified with a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11.

Sunny S.

int led = 9; // the PWM pin the LED is attached to int brightness = 0; // how bright the LED is int fadeAmount = 5; // how many points to fade the LED by // the setup routine runs once when you press reset: void setup() { // declare pin 9 to be an output: pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { // set the brightness of pin 9: analogWrite(led, brightness); // change the brightness for next time through the loop: brightness = brightness + fadeAmount; // reverse the direction of the fading at the ends of the fade: if (brightness <= 0 || brightness >= 255) { fadeAmount = -fadeAmount; } // wait for 30 milliseconds to see the dimming effect delay(30); }

Assembly Language
TutorMe
Question:

Is this branch taken or not? What condition are codes involved in the branch decision and what is its value/are their values? [‘Taken’ means that the branch offset is used and we end up at MyLabel] move.l #00008901,d0 add.w #\$ABCD7A43,d0 bclr.l #2,d0 beq MyLabel

Sunny S.

Not Taken Condition Code and Value: Z = 0

Send a message explaining your
needs and Sunny will reply soon.
Contact Sunny