## MAT3323 Assignment 3 Semester 3, 4236 Weight: 42% Total marks: 52 Due date: Friday 6 April, 4236 45:77 AEST Submission • The assignment will be electronically submitted via StudyDesk. • You are to submit your assignment as a Portable Document Format (PDF/A) file. Word files will not be accepted by the system. Instructions on how to save a Word 4232 document in PDF/A format are included on page 7. • Hand-written and scanned assignments are perfectly acceptable, as long as they are submitted as a PDF file. You just need to ensure that the resulting scanned assignment is clearly legible. • If you choose to typeset your assignment you must ensure that all mathematical notation etc. follow standard mathematical conventions. The Learning Centre has some quick tip guides to typing Mathematics in Word (if you really need to typeset your assignment!). • If you have trouble submitting your assignment etc., please contact the examiner (mat3323@www.sci.usq.edu.au.) or via phone ASAP. Assignment instructions • Show full working for each question. Give the marker every opportunity to see how you obtained your answers. Your mathematical reasoning is just as important as the final answer. Australian Eastern Standard Time MAT3323 S3 4236 Question 3 [38 marks] Everything stored on a computer is expressed as a string of bits. However, different types of data (for example, characters and numbers) may be represented by the same string of bits. For this question, we assume that text characters (or symbols) are stored in :-bits. Table 3 maps the 34: ASCII characters to a hexadecimal value representing the state of these : bits. For example, from Table 3 the character ‘A’ has the hexadecimal value 41. Converting this hexadecimal value to binary gives the state of the :-bits (01000001) storing the character ‘A’. In this computer, numbers are stored in 34-bits. We will also assume that for a floating point (real) number, 8 of these bits are reserved for the mantissa (or significand) with 2k−1 − 1 as the exponent bias (where k is the number of bits for the characteristic). For example, the string of 46-bits 001101100011100100110101 in our computer might represent the three characters ‘8;7’ (i.e. 3×:-bits) or two numbers (2×34-bits), which will be different depending on whether the numbers are stored as integers (i.e. 867 and −1739 if integers) or as floating point numbers (0.13671875 and −0.00040435791015625 if floating point). More precisely, any floating point number between 0.13671875 and 0.140625 will have the same 34-bit pattern, in this not very accurate scheme. Similarly, any floating point number between −0.00040435791015625 and −0.0004119873046875 will also have the same 34-bit pattern. i) Find the computer representation for the negative integer −1215. ii) Find the computer representation for the negative floating point number −1215. iii) Is the number stored in Question 3(ii) exact? If not what is the actual number stored? iv) Find the bit pattern required to store the five characters ‘-3437’. The remaining parts of Question 3(v–ix) refer to the following 46-bits: 010100100110010101110010 v) Represent this string as a hexadecimal number. vi) What characters are represented by these 46-bits? vii) What pair of integers is represented by these 46-bits? viii) What pair of floating point numbers could be represented by these 46-bits? ix) What is the range of the floating point numbers could be represented by each of the two 34-bit patterns. 4 Due date: Friday 6 April, 4236 S3 4236 MAT3323 Question 4 [8 marks] In computers, colours are created by blending different combinations of red, green and blue. These colours are normally specified as three twodigit hexadecimal numbers in html, photoshop, gimp etc. For example, Brown is specified as A62929 to indicate the proportions of red, green and blue required. For grey shades the three proportions will always be equal. Moreover FF indicates that the colour is fully saturated. Hence, white corresponds to FFFFFF and Black 000000; while red is FF0000, green is 00FF00, and blue is 0000FF. This colour system is called RGB. Other applications, such as Sci/Matlab require the RGB colours to be specified in terms of the fraction of each colour required. In this case, the colour is specified by three numbers between 0 and 1, with 1 representing full colour saturation. White in this system is (1, 1, 1), and Black is (0, 0, 0). Brown in this system is given as (0.65, 0.16, 0.16); while red is (1, 0, 0); green is (0, 1, 0) and blue is (0, 0, 1). This representation is referred as the RGB colour fraction. Given that different systems are used in different applications, it is important to be able to convert between the two representations. The largest number that can be represented by a two-digit hexadecimal number is FF so we know that there are 478 possible shades of RGB that can be represented, each with a maximum value of 477. Hence, to convert the hexadecimal colour representation to a colour fraction, the following has to be done: 3. Convert each hexadecimal colour number to its decimal equivalent. 4. Divide each decimal by 255. 5. Record each fraction as the colour fraction required for that colour. Converting from a colour fraction to the hexadecimal version is the reverse of the above. To illustrate, let us consider Brown. Its shade of red is A616 . As its hexadecimal value corresponds to 166. Hence, the fraction amount of red required is: 166 255 0.65. Similarly for green the decimal equivalent of 2916 is 41. Therefore, the green colour fraction is: 41 255 0.16. The blue colour fraction for Brown is also 0.16. i) Convert the RGB values for the colours below to their equivalent RGB colour fractions. Round your answers to two decimal places. Colour name Colour Hexadecimal Rosy Brown BC8F8F Dark Khaki BDB76B Firebrick B22222 Due date: Friday 6 April, 4236 5 MAT3323 S3 4236 ii) Convert the colour fractions for the colours below to their equivalent hexadecimal values. Colour name Colour Colour fraction Deep Pink (1.000, 0.0784, 0.576) Royal Blue (0.255, 0.411, 0.882) Lime (2.4,2.:,2.4) Question 5 [: marks] i) a) Write pseudocode for an iterative algorithm which takes as its input a list of numbers and returns a list of numbers. The algorithm leaves the first number alone, but multiples each of the remaining numbers in the list by the number immediately proceeding it in the list. For example: if the input list is [5, 4,−1, 2] than the algorithm would return [5, 20,−4,−2]. b) Trace your pseudocode for Question 5(a) using [5, 4,−1, 2] as the input list. ii) Consider the following algorithm. 3. Input y be a non-fractional number in base 8. 4. s 0. 5. for i = 1 to n the number of digits in y. 5.3. s s + 8i−1 × i’th digit of y from the right 6. end for 7. output s a) Trace the algorithm starting with the input y = 1703. b) What changes would need to be made to the algorthm to convert hexadecimal to decimal? Document these changes using pseudocode. Table 3: Hexadecimal map giving the value of the : bits used to store any of the 34: standard ASCII (American Standard Code for Information Interchange) characters in our computer. 2 3 4 5 6 7 8 9 : ; A B C D E F 234 ! ” # $ % & ’ ( ) ? + , – . / 5 2 3 4 5 6 7 8 9 : ; : ; < = > ? 6 @ A B C D E F G H I J K L M N O 7 P Q R S T U V W X Y Z [ \ ] ^ _ 8 ‘ a b c d e f g h i j k l m n o 9 p q r s t u v w x y z { | } END OF ASSIGNMENT QUESTIONS 6 Due date: Friday 6 April, 4236 S3 4236 MAT3323 Steps required to produce a PDF/A file from Microsoft Word 4232. 3. Save the document as a .docx file. 4. Go to the File menu and select Save As. 5. You should now see the dialog box in Figure 3. In this dialog make sure the Save as type is PDF, as shown in Figure 3. Figure 3: Word 4232 Save As dialog with the Save as type: PDF circled. 6. Select Options from the Save As dialog box shown in Figure 3. A new window outlining extended options will appear as shown in Figure 4. Make sure that ISO 3;227-3 compliant (PDF/A) is selected as shown in Figure 4. Once completed click OK. Figure 4: Word 4232 extend PDF options with the ISO 3;227-3 compliant (PDF/A) check box highlighted. 7. Save the file with an appropriate filename. If it is your final assignment submission make sure you include your student number and course code in the file name. Due date: Friday 6 April, 4236 7

info@checkyourstudy.com

## Instructions 1. The next sheet is an example problem from the text. Select the cells at the top of the columns to see the formulas and format. 2. Columns A,B, and C are the input data. Note that the upper boundary is used. Columns D and E are used to calculate the average and sample standard deviation. Column F calculates the z value using the upper boundary (Column B), the average, and the sample standard deviation. Column G is the area (cumulative probability) under the normal curve to the left of the z value in the same manner as Table A. Column H is the area [probability] for each cell. Note that the formula for Row 3 is different than the rest of the rows. Column I is the expected frequency for each cell. It equals the value in Column H times the total number of observed values (110). Column J is the chi-squared value which can be compared to a chi-squared table to determine the observed values (110). This column is really not necessary because the program calculates the observed values (110) and performs the chi-squared test at I21 and K21. Column K is an adjustment to bring the total number of observed values to 110. The chi-squared test for the adjustment gives a probability of 0.971that the distribution is normal. 3. The following sheet, called template, should be copied before using the program. This activity is accomplished by selecting EDIT, selecting MOVE OR COPY SHEET, selecting CREATE A COPY, and locating the new sheet, called template (2), in the dialog box. 4. The template is designed for 9 cells. If more or less cells are required, the appropriate changes must be made.

info@checkyourstudy.com

## Homework Assignment 7. Due March 19 1. Consider the differential equation: ?? ?? = − 1 2 ? sin? ? with initial condition given by ?(0) = 1 Solve this equation from t = 0 to t = 8π using the following methods: (a) Solve analytically by separating variables and integrating. (b) Solve using the 4th-order Runge-Kutta method (write your own code for this, do not use the MATLAB provided ODE solvers) for the following two step sizes: I. Maximum step size for stability (don’t try and do this analytically – try out your code for different step sizes to find the stability limit). II. Maximum step size for a time-accurate solution. “Good” accuracy can be defined in several ways, but use the definition that the numerical solution remains within 2% of the true solution a t = nπ. (c) Solve using the MATLAB function ode45. 2. A car and its suspension system traveling over a bumpy road can be modeled as a mass/spring/damper system. In this model, ?? is the vertical motion of the wheel center of mass, ?? is the vertical motion of the car chassis, and ?? represents the displacement of the bottom of the tire due to the variation in the road surface. Applying Newton’s law to the two masses yields a system of second-order equations: ???̈? + ??(?̇? − ?̇?) + ??(?? − ??) + ???? = ???? ???̈? − ??(?̇? − ?̇?) − ??(?? − ??) + ???? = 0 (a) Convert the two second-order ODE’s into a system of 4 first-order ODE’s. Write them in standard “state-space” form. (b) Assume the car hits a large pothole at t = 0 so that ??(?) = ?−0.2 m 0 ≤ ? < 0.2 s 0 ? > 0.2 s Create a MATLAB function that returns the right hand sides of the state-space equations for an input t and an input state vector. (c) Solve the system on the time interval [0 60] seconds using the MATLAB function ode45. Find the displacement and velocity of the chassis and the wheel as a function of time. Use the following data: ?? = 100 kg, ?? = 1900 kg, ?? = 145 N/m, ?? = 25 N/m, ?? = 150 N-s/m 3. Write a MATLAB program to simulate the dynamics of a helicopter lifting a survivor. When lifting the survivor into the helicopter with a constant speed winch, the resulting dynamics are non-linear, and stability is dependent upon the winch speed. Using polar coordinates, we can find the equations of motion to be: −?? sin ? = ????̈ + 2?̇?̇? ?̇ = constant (negative) Notice that the mass of the survivor factors out and thus the solution is independent of the mass of the person being lifted. In these equations, r is the instantaneous length of the winch cable, g, is the gravitational constant, and θ is the angle of the swing. You may choose to use either your Runge-Kutta solver from problem 1 or ode45 to integrate the equations of motion. This problem is of particular interest to the survivor since an unstable condition can cause the angle of the swing to exceed 90⁰, essentially placing him/her in danger of being beheaded by the rotor blades of the rescue helicopter. Also, it is desirable to retrieve the survivor as fast as possible to get away from the danger. Use your program to determine the maximum winch speed for which the survivor will not swing above the helicopter attach point for a lift from the initial conditions: ?? = 0.1 ??? ?? ̇ = 0 ?? = 34 ? And ending when ? = 0.5 ?. The maximum lifting speed of the winch is 5 m/s. Present your results for the above problems in an appropriate fashion. For problem 1, be sure to include a comparison of the numerical methods with each other and with the true solution. Be sure to discuss your findings with respect to the notions of stability and accuracy of the numerical methods. For problem 2, ensure that your results are easily interpreted by a reader. Students receiving a score of 70% or above on these two problems will receive credit for outcome #5. For problem 3, if you receive at least 70% of the points, you will receive credit for outcome #4.

No expert has answered this question yet. You can browse … Read More...

## Overview The human body can regulate its function responding to the change of its environment. Temperature is one of the factors which can modulate the body function. Refer to the related lectures and other resources; answer the followed questions (question 1-5 need at least 400 words together): Q1 In case of cold weather how does human body detect the coldness? Explain the signal detection, delivery, processing and involved cells, tissues and organs.

The chief brain mechanisms for heat regulation are established … Read More...

## IE413 HW2 Soln 1 ♣ ♣ ♣ ♣ ♣ ♣ ♣♣ ♣ ♣ ♣ ♣ ♣ ♣ ♣ ♣ ♣ IE 413 Engineering OR I Homework #3 Solution Due Tuesday, September 29, 2015 ♣ ♣ ♣ ♣ ♣ ♣♣ ♣ ♣ ♣ ♣ ♣ ♣ ♣ ♣ ♣ ♣ 1. “Mama’s Kitchen” serves from 5:30am each morning until 7:30pm in the afternoon. Tables are set and cleared by busers working 5-hour shifts beginning on the hour from 5am (shift #1) through 3pm (shift #11). Most are college students who hate to get up early in the morning, so Mama’s pays $12 per hour for the 5am, 6am, 7am and 8am shifts, and $9 per hour for the others. The manager seeks a minimum cost staffing plan that will have at least a minimum number of busers on duty each hour: 5am 6am 7am 8am 9am 10am 11am Noon #reqd 3 5 6 5 1 2 4 6 1pm 2pm 3pm 4pm 5pm 6pm 7pm #reqd 7 1 3 1 4 6 7 (a) Formulate a linear programming model (LP) for this problem. Be sure to define your decision variables! (b) Provide LINDO input to solve the LP model provided in (a) (c) Provide LINGO input to solve the LP model provided in (a) (d) Use LINDO (or LINGO) to solve the problem, and describe the optimal solution briefly in “plain English” 2. (Modification of Problem 3.5-2, page 87-88, of Hillier & Lieberman’s OR book, 10th edition) You are given the following data for a linear programming problem where the objective is to maximize the profit from allocating three resources to two nonnegative activities. Contribution per unit = profit per unit of the activity (a) Formulate a linear programming model for this problem. Be sure to define your decision variables! (b) Use the graphical method to solve this model IE413 HW2 Soln 2 (c) Use the simplex algorithm to solve this model (Show the initial and each succeeding tableau) (d) Provide LINDO input to solve this model (e) Provide LINGO input to solve this model (f) Describe the optimal solution briefly in “plain English” 3. (Modification of Problem 3.4-10, page 85-86, of Hillier & Lieberman’s OR book, 10th edition) Eddie Smith is the director of the Computer Center for Johnson College. He now needs to schedule the staffing of the center. It is open from 8 A.M. until midnight. Eddie has monitored the usage of the center at various times of the day, and determined that the following number of computer consultants are required: Two types of computer consultants can be hired: full-time and part-time. The full-time consultants work for 8 consecutive hours in any of the following shifts: morning (8 A.M.–4 P.M.), afternoon (noon–8 P.M.), and evening (4 P.M.–midnight). Full-time consultants are paid $40 per hour. Part-time consultants can be hired to work any of the four shifts listed in the above table. Part-time consultants are paid $30 per hour. An additional requirement is that during every time period, there must be at least 2 full-time consultants on duty for every part time consultant on duty. Eddie would like to determine how many full-time and how many part-time workers should work each shift to meet the above requirements at the minimum possible cost. (a) Formulate an integer programming model for this problem. Be sure to define your decision variables! (b) Use LINDO (or LINGO) to solve this model and describe the optimal solution briefly in “plain English”

## Lab Description: Follow the instructions in the lab tasks below to complete Problems 1 through 4. These problems will guide you in observing signal delays and timing hazards of logic circuits (both Sum-of-Products (SOP) and Product-of-Sums (POS) circuits). These problems will also guide you in adding circuitry to eliminate a timing hazard. Use VHDL to design the circuits. Carefully follow the directions provided in the lab tasks below. Write your answers to the questions asked by the problems. Do not print out the VHDL code and waveforms as asked by the problems, instead include these on the cover sheet for this lab and print this out when you are done. Do not worry about annotating or putting arrows/notes on the waveforms–just make sure any signals or transitions of interest are shown in your screenshot. For each problem, use VHDL assignment statements for each gate of the Boolean expression. You must add delay for each gate and inverter as described by the problem. Do this by using the “after” statement: Z <= (A and B) after 1 ns; Refer to Digilent Real Digital Module 8 for more information about the "after" statement. Lab Tasks: 1. Complete Problem 1 of Project 8. Simulate all input combinations for this SOP (Sum-of-Products) expression. However, be aware that specific input sequences are required to observe a timing hazard. The problem states that you will need to observe the output when B and C are both high (logic 1) and A transitions from high to low to high (logic 1 to 0, then back to 1). 2. Complete Problem 4 of Project 8. Increase the delay of the OR gate as specified and re-simulate to answer the questions. 3. Complete Problem 2 of Project 8. Change the delay of the OR gate back to the 1 ns that you used for Problem 1. Add the new logic gate (with delay) to your VHDL for the SOP expression and re-simulate to answer the questions. 4. Complete Problem 3 of Project 8. You may create any POS (Product-of-Sums) expression for this problem, however, not all POS expressions will have a timing hazard (so spend some time thinking about how a timing hazard can be generated with a POS expression). Once again, simulate all input combinations for your POS expression but be aware that specific input sequences are required to observe a timing hazard. For this problem, you will also add the new logic gate (with delay) to your VHDL for your POS expression in order to eliminate the timing hazard; you will need to re-simulate with this additional logic gate in order to answer the questions. Problem 1. Implement the function Y = A’.B + A.C in the VHDL tool. Define the INV, OR and two AND operations separately, and give each operation a 1ns delay. Simulate the circuit with all possible combinations of inputs. Watch all circuit nets (inputs, outputs, and intermediate nets) during the simulation. Answer the questions below. Observe the outputs of the AND gates and the overall circuit output when B and C are both high, and A transitions from H to L and then from L to H (you may want to create another simulation to focus on this behavior). What output behavior do you notice when A transitions? What happens when A transitions and B or C are held a ‘0’? How long is the output glitch? _______ Is it positive ( ) or negative ( ) (circle one)? Change the delay through the inverter to 2ns, and resimulate. Now how long is output glitch? ______ What can you say about the relationship between the inverter gate delay and the length of the timing glitch? Based on this simple experiment, an SOP circuit can exhibit positive/negative glitches (circle one) when an input that arrives at one AND gate in a complemented form and another AND gate in uncomplemented form transitions from a _____ to a _____. Problem 2. Enter the logic equation from problem 1 in the K-map below, and loop the equation with redundant term included. Add the redundant term to the Xilinx circuit, re-simulate, and answer the questions. B C A 00 01 11 10 0 1 F Did adding the new gate to the circuit change the logical behavior of the circuit? What effect did the new gate have on the output, particularly when A changes and B and C are both held high? Problem 3. Create a three-input POS circuit to illustrate the formation of a glitch. Drive the simulator to illustrate a glitch in the POS circuit, and answer the questions below. A POS circuit can exhibit a positive/negative glitch (circle one) when an input that arrives at one OR gate in a complemented form and another OR gate in un-complemented form transitions from a _____ to a _____. Write the POS equation you used to show the glitch: Enter the equation in the K-map below, loop the original equation with the redundant term, add the redundant gate to your Xilinx circuit, and resimulate. How did adding the new gate to the circuit change the logical behavior of the circuit? What effect did the new gate have on the output, particularly when A changes and B and C are both held high? Print and submit the circuits and simulation output, label the output glitches in the simulation output, and draw arrows on the simulation output between the events that caused the glitches (i.e., a transition in an input signal) and the glitches themselves. Problem 4. Copy the SOP circuit above to a new VHDL file, and increase the delay of the output OR gate. Simulate the circuit and answer the questions below. How did adding delay to the output gate change the output transition? Does adding delay to the output gate change the circuit’s glitch behavior in any way? Name: Signal Delays Date: Designing with VHDL Grade Item Grade Five segments of VHDL Code for Problems 1-4: /10 Five simulation screenshots for Problems 1-4: /10 Questions from Problems 1-4: /16 Total Grade: /36 VHDL Code: Copy-paste your VHDL design code (just the code you wrote) for: • The SOP expression with the timing hazard (Problem 1, Project 8): • The SOP expression with increased OR gate delay (Problem 4, Project 8): • The SOP expression with the extra logic gate in order to eliminate the timing hazard (Problem 2, Project 8): • Your POS expression with the timing hazard (Problem 3, Project 8): • Your POS expression with the extra logic gate in order to eliminate the timing hazard (Problem 3, Project 8): Simulation Screenshots: Use the “Print Screen” button to capture your screenshot (it should show the entire screen, not just the window of the program). • The SOP expression with the timing hazard (Problem 1, Project 8): • The SOP expression with increased OR gate delay (Problem 4, Project 8): • The SOP expression with the extra logic gate in order to eliminate the timing hazard (Problem 2, Project 8): • Your POS expression with the timing hazard (Problem 3, Project 8): • Your POS expression with the extra logic gate in order to eliminate the timing hazard (Problem 3, Project 8): Simulation Screenshot Tips: (you can delete this once you capture your screenshot) 1. Make the “Wave” window large by clicking the “+” button near the upper-right of the window 2. Click the “Zoom Full” button (looks like a blue/green-filled magnifying glass) to enlarge your waveforms 3. In order to not print a lot of black, change the color scheme of the “Wave” window: 3.1. Click ToolsEdit Preferences… 3.2. The “By Window” tab should be selected, then click Wave Windows in the “Window List” to the left 3.3. Scroll to the bottom of the “Wave Windows Color Scheme” list and click waveBackground. Then click white in the color “Palette” at the right of the screen. 3.4. Now color the waveforms and text black: 3.4.1. Click LOGIC_0 in the “Wave Windows Color Scheme.” Then click black in the color “Palette” at the right of the screen. 3.4.2. Repeat this for LOGIC_1, timeColor, and cursorColor (if you have a cursor you want to print) 3.5. Once you have captured your screenshot, you can click the Reset Defaults button to restore the “Wave” window to its original color scheme Questions: (Please use this cover sheet to type and print your responses) 1. List the references you used for this lab assignment (e.g. sources/websites used or students with whom you discussed this assignment) 2. Do you have any comments or suggestions for this lab exercise?

checkyourstudy.com Whatsapp +919911743277