HW2-3750

HW2-3750 - Q is a two digit value, while C , P , and A are...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
EE 3750 — Homework 2 due Monday, September 30, 2002 1. Let AX = 19C3H, BX = 2B11H, CX = 3EE0H, and SP = 1988H. What are the contents of AX, BX, CX, and SP after the following sequence of instructions? PUSH BX POP AX PUSH AX PUSH CX POP BX 2. The following equation arises in calculating flow conditions for natural gas through a pipe. H = Q C 2 P + A (a) Write an 8086 instruction sequence to compute the equation assuming that the values are given as unsigned binary integers. Let Q be a word variable, and let C , P , and A be byte variables. What type of variable should H be? (b) Write an 8086 instruction sequence to compute the equation assuming that the values are given in unpacked BCD format. All variables are byte variables. Variable
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Q is a two digit value, while C , P , and A are one digit values. 3. Liu and Gibson, Chapter 3, Problem 29 4. A perceptron element in a neural network computes the inner product of its weight vector and its input vector, then checks whether the result is at or above a threshold to determine its output. Write an 8086 instruction to implement the following pseudocode for a perceptron. Let weight and input be byte variables (arrays) and let output be a byte variable. Assume that all other variables are word variables. Let all variables hold signed integers. accum for j 0 to numin 1 accum accum + weight j input j if accum theta then output 1 else output 1...
View Full Document

Ask a homework question - tutors are online