• edited by
1,134 views
0 0 votes

Consider the following grammar with corresponding synthesized attributes:
F → ⋅L {F.val = L.val}
L → LB {L.len = L.len + 1} {L.val = L.val+2 ^(-L.len)

× B.val}
L → B {L.len = 1, L.val = B.val/2}
B → 0 {B.val = 0}
B → 1 {B.val = 1}
If “F.val” gives the value of the binary fraction generated by F in above grammar then, the value of F.val on input {0.110} is _______. (Upto 3 decimal places)

 

 

Solution : 

 

Doubt : 

B.val = 0 ( red) 

then how 0.875 ( yellow ) ?

wont it be : 

0.75 + 2^-3 * 0 = 0.75 ?

 

 

Please log in or register to answer this question.

Position:
Show:

Related questions

2 2 votes
2 2 answers
1.9k
1.9k views
HeadShot asked Jan 5, 2019
1,853 views
Doubt: ( Even if we take compliment , its wont satisfy it )
0 0 votes
1 1 answer
1.1k
1.1k views
HeadShot asked Jan 5, 2019
1,136 views
Which of the following best characterizes about memory mapped I/O?A.Additional hardware for bus is required to control the 1/0 bus and memory bus.B.Some of the address sp...
2 2 votes
0 0 answers
1.2k
1.2k views
HeadShot asked Jan 5, 2019
1,202 views
Assume in TCP client is sending segment toserver. After successfully receiving segmentsfrom client, server is waiting for next segments and clients is also waiting for ac...
0 0 votes
0 0 answers
1.9k
1.9k views
HeadShot asked Jan 5, 2019
1,901 views
Consider the following statements(I) Execution time for single instruction on six stagepipelined CPU is less than or equal to identical non-pipelined CPU.(ii) In a unifor...