Assignment 1 for Computer Systems | ELEC 2220, Assignments of Electrical and Electronics Engineering

Material Type: Assignment; Class: COMPUTER SYSTEMS; Subject: Electrical and Computer En; University: Auburn University - Main Campus; Term: Fall 2008;

Typology: Assignments

Pre 2010

Uploaded on 02/24/2010

koofers-user-i7u-1
koofers-user-i7u-1 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ELEC 2220 - Homework Assignment #1
Prerequisite Review
Due Wednesday, August 20, 2008
1. Write a short program in either C or Java that will read non-zero integer numbers
entered from a keyboard until a zero is entered, and then identify and print the
smallest number, the largest number, and the average value (dont count the 0 in the
average). Assume numbers in the range [-32000 … +32000]. Execute the program,
entering 12-15 values, scattered across the above range (both positive and negative
values). Turn in a printout of the program and the results
Example:
30
-25
18
-3
0
Smallest = -25
Largest = 30
Average = 5
2. Four light-emitting diodes (LEDs) are designated as LED0, LED1, LED2, and
LED3. These LEDs are illuminated by applying a voltage to them corresponding
to "logic 1", and darkened by applying a voltage to them corresponding to logic 0.
A computer generates a 4-bit number A = a3a2a1a0. Design and sketch a digital
logic circuit that will illuminate LED0 when A=1100, LED1 when A=1101,
LED2 when A=1110, and LED3 when A=1111. For all other values of A, the
LEDs should be dark. You may use logic gates and/or decoder modules for your
circuit. Clearly label all LEDs and signal lines.

Partial preview of the text

Download Assignment 1 for Computer Systems | ELEC 2220 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

ELEC 2220 - Homework Assignment

Prerequisite Review

Due Wednesday, August 20, 2008

  1. Write a short program in either C or Java that will read non-zero integer numbers entered from a keyboard until a zero is entered, and then identify and print the smallest number, the largest number, and the average value (don’t count the 0 in the average). Assume numbers in the range [-32000 … +32000]. Execute the program, entering 12-15 values, scattered across the above range (both positive and negative values). Turn in a printout of the program and the results

Example: 30

18

0 Smallest = - Largest = 30 Average = 5

  1. Four light-emitting diodes (LEDs) are designated as LED0, LED1, LED2, and LED3. These LEDs are illuminated by applying a voltage to them corresponding to "logic 1", and darkened by applying a voltage to them corresponding to logic 0. A computer generates a 4-bit number A = a 3 a 2 a 1 a 0. Design and sketch a digital logic circuit that will illuminate LED0 when A=1100, LED1 when A=1101, LED2 when A=1110, and LED3 when A=1111. For all other values of A, the LEDs should be dark. You may use logic gates and/or decoder modules for your circuit. Clearly label all LEDs and signal lines.