Professional Documents
Culture Documents
Modeling and Simulation PS3 WS22
Modeling and Simulation PS3 WS22
Theoretische Elektrotechnik
Universität Paderborn
1. Solve the following and state the formulas used for the conversion: (15P)
(a) Convert these unsigned integers from binary to decimal: 10111010, 01110101, 11111111.
(2P)
(b) Convert these signed integers from binary to decimal: 10100010, 11010101, 11111111. (2P)
(c) Convert these decimals to signed 8-bit integers: 76, 128, −75. (2P)
(d) Convert the hexadecimal number 01A1 to decimal and then the obtained decimal number
to octal. (2P)
(e) Convert this single floating point number to decimal: 1′ 10000001′ 11010000000000000000000.(2P)
(f) Convert the octal number 6732 to binary. (1P)
(g) Consider the unsigned binary patterns in part (a) as unsigned fixed-point numbers with
a fixed binary point b = 3. Convert these unsigned fixed-point numbers to decimal. (2P)
(h) Consider the signed binary patterns in part (b) as signed fixed-point numbers with a fixed
binary point b = 2. Convert these signed fixed-point numbers to decimal. (2P)
2. Write a Matlab program that finds the largest floating point number x = 2−n for which
the representation of 1.0 + x numerically equals 1.0 and print its approximate decimal value.
Compare this value with the Matlab constant “eps” (see help). Derive how many mantissa bits
floating point numbers in Matlab have and which IEEE type is used. (5P)
1. Write the Exs. 1 on a sheet of paper, make a photo, and create “pdf” file with name
“ps 3 ex 1 your matriculation number.pdf ”
2. One script m-file of Exs. 2 with name “ps 3 ex 2 your matriculation number.m”