C_Stottlemeyer_ECET375_WK3_lab
.docx
keyboard_arrow_up
School
DeVry University, Chicago *
*We aren’t endorsed by this school
Course
375
Subject
Electrical Engineering
Date
Jun 4, 2024
Type
docx
Pages
16
Uploaded by cls8879
WEEK 3 LAB
ECET 375
MARCH 25, 2019
CHRIS STOTTLEMEYER
1
Experiments:
1)
The Matlab function dec2base(str,n,m) is very helpful in converting characters into a string of m digit string in base n. For example, dec2base(‘a’, 2, 8) will convert the ASCII code for ‘a’ into an 8 bit binary number expressed as a string of 8 bits.
Since we have four symbols, one for two bits, we use the dec2base(str,4,4) function.
The following sequence of commands (which are part of script file str2pam.m) is the basis for letters to symbol conversion.
What do you see when you run this script? What do you expect the binary code for the letter ‘n’ to be? What are its 4-PAM symbols?
A.) Binary code for the letter ‘a’ is 01100001
4-PAM symbols are [-1, 1, -3, -1]
1)
Change the str variable in the script to ‘Pay $200’. Run the code and record the output. What is the output? How many symbols are there? What is the code for $ sign? What is the relationship between the number of symbols and the number of letters?
A.) 01010000
01100001
01111001
00100000
00100100
00110010
00110000
00110000
4 digits base 4 for ‘Pay $200’ are 1100
1201
1321
0200
0210
0302
0300
0300
Multiply by 2 98
98
96
96
98
100
96
98
98
102
100
98
96
100
96
96
96
100
98
96
96
102
96
100
96
102
96
96
96
102
96
96
2
4-PAM symbols are -1
-1
-3
-3
-1
1
-3
-1
-1
3
1
-1
-3
1
-3
-3
-3
1
-1
-3
-3
3
-3
1
-3
3
-3
-3
-3
3
-3
-3
1.
Transforming Symbols to Signals
In this step, we convert the symbols into signals for transmission. Ideally we want to choose such signals that: i)
cause no inter-symbol interference (ISI; i.e., the value of the message at a given time does not interfere with the value of the message at other times)
ii)
are efficient in terms of bandwidth usage
iii)
are not adversely affected by noise that is invariably present in transmission systems
The program given below generates and displays rectangular, Hamming, sync, and square-root raised
cosign (SRRC) pulse shapes and their spectrum.
The following program illustrates the example pulse shapes:
%% ECET-375 Lab-2: pulseShapes.m %%generate symbols % Create a random +/- L-PAM source symbol sequence with
% length N and variance 'Var'
L=4; Var=5; N=1000;
s=2*floor(L*rand(1,N))-L+1;
s=s*sqrt(3*Var/(L^2-1));
%oversample by M points to simulate analog system
M=20; ovrSampled=zeros(1,N*M); ovrSampled(1:M:end)=s % oversampling by factor of M
pulseChoice = 'srrc'
% 'Rectangle' 'Hamming' 'Sync' 'rc, 'srrc'
switch (lower(pulseChoice))
case 'hamming'
% Generate hamming pulse
extent = 1;
3
pulseSig=hamming(extent*M);
pulseShapeTitle = 'Hamming Pulse'
;
case 'rectangle'
%generate pulses used to convert symbols into signals
pulseSig=ones(1,M); % rectangular/square pulse width M
pulseShapeTitle = 'Rectangular Pulse'
;
case 'sync'
f6db=10; % 6db width of the sync pulse
beta=1e-8;
%zero for beta in raised cosine signal yields sinc pulse
indx=-4/(2*f6db)+1e-8:1/(10*2*f6db):4/(2*f6db)+1e-8; % sampling indices
pulseSig=(sin(2*pi*f6db*indx)./(2*pi*f6db*indx)).*(cos(2*pi*beta*f6db*indx)./(1-
(4*beta*f6db*indx).^2));
pulseShapeTitle=
'Sync Pulse'
case 'srrc'
% Generate a Square-Root Raised Cosine Pulse
beta=0.3;
% try different values for the roll-off factor; a value of 0 yields the sinc pulse
f6db=10; % 6db width of the sync pulse
indx=-4/(2*f6db)+1e-8:1/(10*2*f6db):4/(2*f6db)+1e-8; % sampling indices
pulseSig=(sin(2*pi*f6db*indx)./(2*pi*f6db*indx)).*(cos(2*pi*beta*f6db*indx)./(1-
(4*beta*f6db*indx).^2));
pulseShapeTitle=
'SRRC Pulse'
otherwise
% Generate hamming pulse
extent = 1;
pulseSig=hamming(extent*M) %ones(1,M);
pulseShapeTitle = 'Hamming Pulse'
;
end
%Simulate the received signal
recSig=filter(pulseSig,1,ovrSampled); % convolve pulse shape with oversampled signal
tt=1/M:1/M:length(pulseSig)/M;
figure(1)
4
subplot(3,1,1), plot(tt,pulseSig)
ylabel(
'Pulse shape'
)
xlabel(
'one sample period'
)
title(pulseShapeTitle)
[h,w]=freqz(pulseSig);
subplot(3,1,2), semilogy(w/pi,abs(h))
ylabel(
'Pulse spectrum'
)
xlabel(
'normalized frequency'
)
fftx=abs(fft(recSig));
subplot(3,1,3), semilogy(2*(1:length(fftx)/2)/length(fftx),fftx(1:length(fftx)/2))
ylabel(
'Waveform spectrum'
)
xlabel(
'normalized frequency'
)
Experiments:
The pulseShapes.m
program shown above has capability to display one of the four pulse shapes (Hamming, rectangle, Sync, or SRRC) and its spectrum. 1)
Make the choice of one of Hamming, Rectangle, Sync, or SRRC one at a time. Save the graphs you obtain for each in your lab report. Which pulse shape produces the smallest bandwidth? Which pulse shape has the widest bandwidth?
5
SRRC has the smallest pulse. Hamming has the widest.
2)
Which pulse shape has widest span in the time-domain? Which pulse shape has the narrowest
span in the time-domain?
A.) Hamming pulse has widest span in the time domain and Rectangular has the narrowest span. 2.
Eye Diagrams
The inter-symbol interference (ISI) occurs when signals of adjacent symbols interfere with each other. This may occur when the pulse shapes used for symbols are wider than the time allocated for one symbol. It is like a radio program that continues beyond its allotted time and into the next program’s time slot. Another reason for ISI is that a noisy channel impairs the signals (for example, causes unequal phase delays for different input frequencies) so much that they spill over to adjacent channels. The ISI may cause the receiver to incorrectly decode the bits from the signals. The eye diagram is a visual tool that can be used to understand the extent of impairments to the transmitted signal.
If you overlay the traces of received signal for every n symbols (that is, if you restart the trace on an oscilloscope every nT seconds) without erasing the previous traces, the picture you see is the eye diagram. The abscissa displays the time for n symbols, and the ordinate displays the received
signal amplitude. As the number of overlaid traces increases, the eye diagram becomes thicker and can show how the effects of noise, channel impairments, and other detrimental factors contribute to the difficulty of correctly determining the transmitted message.
The following Matlab program illustrates the generation of eye diagrams for different pulse shapes.
%% ECET-375 Lab-3: eyeDiagrams.m %%generate symbols
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
6) Write an 8086 assembly language program to multiply the contents of the registers CL & BL
by using repeated addition and store the result in AX.
0006
arrow_forward
ehcu.org/pluginfile
100%
10 / 11
locations, count how many times is 0 and how
many times 1 is.
Questions:-
1- Write a program in assembly language to perform the following logic
ci
BL
CL
DL
[5100]-
2- How we can perform the NEG and NOT instructions by using different
instructions.
3- Write the following program by using different instruction or instructions
for each instruction on the
program.
MOV AL , 00
MOV BX , FFFF
XOR CL , FF
NEG BYTE PTR [DI]
AND CX ,
LG
arrow_forward
b) There are five binary or hexadecimal numbers and six decimal conversions. Draw a line to
connect each binary/hexadecimal to decimal number.
Binary/Hexadecimal
Decimal
4E
78
11011010
157
10011101
167
A7
25
19
218
arrow_forward
Write an assembly 8051 code to count a hexadecimal digit every second and display it on the 7-segment.
arrow_forward
Digital Electronics
Are these complete answers? I want complete
arrow_forward
bit numbers and store lower byte of the result in accumulator A and higher byte in accumulator B..
Similarly lower byte of 2nd number is stored in R2 and higher byte in R3. Now subtract these two 16
numbers in the RAM such that lower byte of 1t number is stored in R0 and higher byte in RI.
manipulate 16 bits numbers as well. Write an assembly language program that stores two 16 bits
8051 is an 8-bit microcontroller that performs arithmetic on 8-bit numbers. However, we can
Question#3:
8051 is an 8-bit microcontroller that performs arithmetic on 8-bit numbers. Howeve
arrow_forward
Design a code converter that converts a decimal digit from
BCD to excess-3 code, the input variables are organized as
(A BC D) respectively with A is the MSB, the output
variables are organized as (W X Y Z) respectively with W is
the MSB, put the invalid decimal numbers as don't care.
X= BCD'+B'D+B'C
X= BC'D'+B'D+BC
X= BC'D'+B'D+B'C
X= BC'D'+BD+B'C
arrow_forward
Design a code converter that converts a decimal digit from
BCD to excess-3 code, the input variables are organized as
(A BC D) respectively with A is the MSB, the output
variables are organized as (W XY Z) respectively with W is
the MSB, put the invalid decimal numbers as don't care.
X= BCD'+B'D+B'C
X= BC'D'+B'D+BC
X= BC'D'+B'D+B'C
X= BC'D'+BD+B'C
arrow_forward
20. Suppose we have just found yet another representation for floating point numbers. Using this
representation, a li2-bit floating point number has 1 bit for the sign of the number, 4 bits for
the exponent and 7 bits for the mantissa, which is normalized as in the Simple Model so that
the first digit to the right of the radix points must be a 1. Numbers in the exponent are in signed
2's complement representation. No bias is used and there are no implied bits. Show the
representation for the smallest positive number this machine can represent using the following
format (simply fill in the squares provided). What decimal number does this equate to? :
SIGN
EXPONENT
MANTISSA
arrow_forward
Question 4
a) The IEEE Standard 754 representation of a floating point number
is given as: 01101110110011010100000000000000. Determine the
binary value represented by this number.
b)
Convert each of the following hexadecimal values to binary.
i) AB1916
ii) 2DEF16
iii) 8A4516
iv) 9B5A16
c)
If a computer's system clock is 2.4 GHz, calculate the period of the
system clock.
d)
If an 8-bit binary number is used to represent an analog value in
the range from 200 ounces to 700 ounces, what is the resolution of
the system?
arrow_forward
a) Convert the decimal number - 239 into a
signed binary number using
(1) sign-magnitude method (2) 1's
complement method (3) 2's complement
method
b) If the above decimal number is positive ,
that is + 239, then convert it to a signed
binary number using 1 's complement
method
c) Do the following binary subtraction:
101111111.01111-
001011010.10110
d)Explain Types of RAM?
arrow_forward
| Solve all parts. Will give thumb's up|
If you can't do all please don't attempt the questions.
arrow_forward
1) What is the biggest binary number (decimal value) you can write with 6 bits?
What is the biggest binary number (decimal value and in terms of n) you can write
with n bits?
If you want to represent the decimal numbers from 0-16, what is the minimum
number of bits you will need?
Convert the decimal number 238 to binary number. (ZERO point if not showing
steps/calculation!)
arrow_forward
convert decimal number 4932 to:
(a) BCD
(b) excess-3 code
(c) ASCII
(d) ASCII with odd parity
(e) hex-coded binary
plz show steps. but you don't need to show steps to ascii. Thanks.
arrow_forward
Electrical Engineering
Suppose ASCII code is used for accurate calculation. What are the ASCII codes stored on computer for the
result of 5632 - 12521? How many bytes are needed for the storage? Show the ASCII codes in decimal from
the leftmost digit or sign to the rightmost digit, then show the number of bytes needed. Separate them with
comma.
arrow_forward
Problem 2
a) Convert each of the following binary numbers to octal and hexadecimal forms: (show your work)
(1111110000.1)2
(10100110)2
(101100011001)2
b) Express each of the following octal/hexadecimal numbers in binary and decimal forms: (show your
work)
(7765) 8
(FB17)16
(A14)16
c) Convert each of the following decimal numbers to BCD:
(128)10
(547)10
(1051)10
arrow_forward
Design the interfacing circuit shown below and write a program to display single digit (between 0 and 9) prime numbers followed by even numbers, the next odd numbers and repeats in 7-segment displays and its equivalent 8-bit binary value in LEDS. a) When displaying Prime numbers, the first 7-segment display must show "P" and the second 7-segment display must show prime numbers one by one b) When displaying Even numbers, the first 7-segment display must show "E" and the second 7-segment display must show even numbers one by one c) When displaying Odd numbers, the first 7-segment display must show "O" and the second 7-segment display must show even numbers one by one
arrow_forward
80886 microprocessor
arrow_forward
urgent please
arrow_forward
Perform floating point binary addition to the following:
A: 1 10000011 10110111010000000000000
B: 0 10000000 10010011000100101000000
The result of A+B must be in be in 32-bit floating point. You can also check the answer in
decimal.
arrow_forward
Answer the D, E and F part
arrow_forward
To convert the decimal number 30 to an 8-bit binary number, use the following representation methods: a) the inverse of its complement: b) Excess-M:?
arrow_forward
Logic Design
courses / EE200SP21 / General / Mid Term Examination Part II (Subjecti
Compute the minimal products of sum and minimal sum of
products expressions for following KMAP. Show your groupings on
KMAP
АВ CD
1
1
1
1
0.
Instructions: You have to solve the answer by hand on paper,
scan/take photo and upload it as a single file.
Local Disk (D:)
Mid Term Examinat.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Related Questions
- 6) Write an 8086 assembly language program to multiply the contents of the registers CL & BL by using repeated addition and store the result in AX. 0006arrow_forwardehcu.org/pluginfile 100% 10 / 11 locations, count how many times is 0 and how many times 1 is. Questions:- 1- Write a program in assembly language to perform the following logic ci BL CL DL [5100]- 2- How we can perform the NEG and NOT instructions by using different instructions. 3- Write the following program by using different instruction or instructions for each instruction on the program. MOV AL , 00 MOV BX , FFFF XOR CL , FF NEG BYTE PTR [DI] AND CX , LGarrow_forwardb) There are five binary or hexadecimal numbers and six decimal conversions. Draw a line to connect each binary/hexadecimal to decimal number. Binary/Hexadecimal Decimal 4E 78 11011010 157 10011101 167 A7 25 19 218arrow_forward
- Write an assembly 8051 code to count a hexadecimal digit every second and display it on the 7-segment.arrow_forwardDigital Electronics Are these complete answers? I want completearrow_forwardbit numbers and store lower byte of the result in accumulator A and higher byte in accumulator B.. Similarly lower byte of 2nd number is stored in R2 and higher byte in R3. Now subtract these two 16 numbers in the RAM such that lower byte of 1t number is stored in R0 and higher byte in RI. manipulate 16 bits numbers as well. Write an assembly language program that stores two 16 bits 8051 is an 8-bit microcontroller that performs arithmetic on 8-bit numbers. However, we can Question#3: 8051 is an 8-bit microcontroller that performs arithmetic on 8-bit numbers. Howevearrow_forward
- Design a code converter that converts a decimal digit from BCD to excess-3 code, the input variables are organized as (A BC D) respectively with A is the MSB, the output variables are organized as (W X Y Z) respectively with W is the MSB, put the invalid decimal numbers as don't care. X= BCD'+B'D+B'C X= BC'D'+B'D+BC X= BC'D'+B'D+B'C X= BC'D'+BD+B'Carrow_forwardDesign a code converter that converts a decimal digit from BCD to excess-3 code, the input variables are organized as (A BC D) respectively with A is the MSB, the output variables are organized as (W XY Z) respectively with W is the MSB, put the invalid decimal numbers as don't care. X= BCD'+B'D+B'C X= BC'D'+B'D+BC X= BC'D'+B'D+B'C X= BC'D'+BD+B'Carrow_forward20. Suppose we have just found yet another representation for floating point numbers. Using this representation, a li2-bit floating point number has 1 bit for the sign of the number, 4 bits for the exponent and 7 bits for the mantissa, which is normalized as in the Simple Model so that the first digit to the right of the radix points must be a 1. Numbers in the exponent are in signed 2's complement representation. No bias is used and there are no implied bits. Show the representation for the smallest positive number this machine can represent using the following format (simply fill in the squares provided). What decimal number does this equate to? : SIGN EXPONENT MANTISSAarrow_forward
- Question 4 a) The IEEE Standard 754 representation of a floating point number is given as: 01101110110011010100000000000000. Determine the binary value represented by this number. b) Convert each of the following hexadecimal values to binary. i) AB1916 ii) 2DEF16 iii) 8A4516 iv) 9B5A16 c) If a computer's system clock is 2.4 GHz, calculate the period of the system clock. d) If an 8-bit binary number is used to represent an analog value in the range from 200 ounces to 700 ounces, what is the resolution of the system?arrow_forwarda) Convert the decimal number - 239 into a signed binary number using (1) sign-magnitude method (2) 1's complement method (3) 2's complement method b) If the above decimal number is positive , that is + 239, then convert it to a signed binary number using 1 's complement method c) Do the following binary subtraction: 101111111.01111- 001011010.10110 d)Explain Types of RAM?arrow_forward| Solve all parts. Will give thumb's up| If you can't do all please don't attempt the questions.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you