Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What's a guard bit?

2,583 views
Skip to first unread message

Meer Taufiq Husain

unread,
Jun 14, 2009, 10:28:24 PM6/14/09
to
Hi,

I was practicing previous midterm questions and I came across a question
regarding floating bit computations (i.e. additions) and it says "Perform
the following floating bit computation, assuming that the operands and
results have 4-bits of precision, but intermediate results use a guard
bit. Show your work, labelling the guard bit."

My solution:

1.101 x 2^3
+1.001 x 2^2
------------
1.2011 x 2^3 => 1.201 x 2^3

What's the guard bit? Thanks.

Matthew Anderson

unread,
Jun 15, 2009, 5:00:30 PM6/15/09
to

Well, first you might want to check your binary.

CS 251

unread,
Jun 16, 2009, 3:01:43 PM6/16/09
to

A guard bit is needed to preserve calculation accuracy for a floating
point operation. It was discussed, along with the round bit, in the
lecture.

CS 251 IA

Taufiq Husain

unread,
Jun 16, 2009, 3:09:09 PM6/16/09
to
Ok. Just got ur message. Thanks, I'll check notes.

Taufiq Husain

unread,
Jun 16, 2009, 3:07:50 PM6/16/09
to
Sorry, I posted wrong solution (mixed up 2 as 10). Hopefully this is the
correct solution:
1.101 x 2^3 ==> 1.1010 x 2^3
+1.001 x 2^2 +0.5005 x 2^3
------------- -------------
1.6015 x 2^3 ==> 1.602 x 2^3

What is the guard bit in this example?

Dan Connell

unread,
Jun 17, 2009, 8:30:15 PM6/17/09
to

It's on page 20 of the notes. It's not specifically referred to as a
"guard bit" in the notes, but it's just mentioned that you have to keep
that (n+2)th bit there for accuracy in rounding.

0 new messages