Docsity

Solutions to Homework 2 of Embedded Real-Time Systems (AME 3623) - Prof. Andrew Fagg, Assignments of Aerospace Engineering

Partial preview of the text

Download Solutions to Homework 2 of Embedded Real-Time Systems (AME 3623) - Prof. Andrew Fagg and more Assignments Aerospace Engineering in PDF only on Docsity!

Embedded Real-Time Systems (AME 3623)

Homework 2 Solutions

February 25, 2009

Question 1

  1. (5pts) Given the binary number: 010111010. What is the decimal equivalent? What is the hexadecimal equivalent? Show your work. 2 + 8 + 16 + 32 + 128 = 186 0 xBA
  2. (5pts) Given the binary number: 110110111. What is the decimal equivalent? What is the hexadecimal equivalent? Show your work. 1 + 2 + 4 + 16 + 32 + 128 + 256 = 439 0 x 1 B 7
  1. (5pts) Given the decimal number: 486. What is the binary equivalent? Show your work (all of the steps of the algorithm that we discussed in class). value binary i 2 i 486 000000000 8 256 230 100000000 7 128 102 110000000 6 64 38 111000000 5 32 6 111100000 2 4 2 111100100 1 2 0 111100110
  2. (5pts) Given the decimal number: 524. What is the binary equivalent? Show your work. value binary i 2 i 524 0000000000 9 512 12 1000000000 3 8 4 1000001000 2 4 0 1000001100
  1. (10pts) Assume that the initial state is: Q0 = 1, Q1 = 0, Q2 = 1 Show the timing diagram for Q0, Q1 and Q2 as the clock (CLK) is pulsed (show 6 transitions).

Q

Q

Q

CLK

  1. (10pts) Interpreting Q2, Q1, Q0 as a 3-bit binary number (with Q0 as the 1’s digit), what is the sequence of values that this circuit produces? Q 2 , Q 1 , Q0 = 101, 111 , 001 , 011 , 101 , 111 , 001 , ... or: 5 , 7 , 1 , 3 , 5 , 7 , 1 , ...
  2. (10pts) What is the mathematical function of this circuit?

The circuit counts by two on each clock cycle. (modulo 8 = after the counter reaches 7, it starts over again).

Question 3

Consider the following circuit with inputs CLK and X:

CLK

X

B

B

Q’

D Q Q’

D Q

  1. (10pts) Assume that the initial state is: Q0 = 1 and Q1 = 0. Assume also that X = 0. Show the timing diagram for Q0 and Q1 as the clock (CLK) is pulsed.

Q

Q

CLK

  1. (10pts) Interpreting Q1, Q0 as a 2-bit binary number (with Q0 as the 1’s digit), what is the sequence of values that this circuit produces? Q 1 Q 0 = 01, 10 , 11 , 00 , 01 , 10 , 11 , ...
  2. (10pts) What is the mathematical function of this circuit when X = 0? Counts by 1 on each clock tick (modulus 4).