The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+10 votes
2.2k views

Booth's coding in 8 bits for the decimal number $-57$ is

  1. 0-100+1000
  2. 0-100+100-1
  3. 0-1+100-10+1
  4. 00-10+100-1

 

asked in Digital Logic by Veteran (69k points)
edited by | 2.2k views

4 Answers

+20 votes
Best answer
There are 2 ways for answering This questions.

1. Way 1 -> Convert 57 to Binary & Get 2's complement. It is "11000111" & Attach one extra 0 to right of it

110001110 To calculate booth code substract right digit from left digit in every consecutive 2 digt.

So 11-> 0 , 10 -> +1, .. finally 10 -> +1

So answer is B)

There is another way to solve this question.

0-100+100-1 -> If you check binary weigted sum of this code you will get -57. This is trick to quick check. Booth code is always equivalent to it's original value if checked as weighted code. IF you check it before doing above procedure & if only one of option maps, you don't need to do above procedure, just mark the answer.

Here -1  * 64 + +1 * 8 + -1 * 1 = -57 .
answered by Veteran (49.5k points)
selected by
Someone please explain first method?
please explain why do we have to add a zero at the end of 2's complement
Go to Zaky Hamatcher CO book chapter 6
Selected answer says - "To calculate booth code substract right digit from left digit in every consecutive 2 digt".
Actually, we have to scan from right to left by appending a zero in the LSB. Then, subtract the left bit from the right bit all the way till MSB.

Further, a transition from 0 to 1 indicates that 'block of 1s' has started and a transition from 1 to 0 indicates that block of 1's has ended; similarly transition from 1 to 1 indicates we are still in the block of 1's.
+6 votes
B  -57 i s represented as 1000111  on moving from 0 to 1 we get -1 and from 1 to 0 we get 1

so ans is b
answered by Veteran (34.3k points)
'in 8 bits' its, 11000111 as given by Night's King below.
+4 votes

a) If ith bit is '1' and (i-1)th bit is '0' , we substitute ith bit with  '-1' .

b)  If ith bit is '0' and (i-1)th bit is '1' , we substitute ith bit with  '+1' .

c)  If ith bit is '0' and (i-1)th bit is '0' or  ith bit is '1' and (i-1)th bit is '1' then , we substitute ith bit with  '0'.

d) If LSB bit a0 is '1' , we assume that a-1 is there and = '0' and hence substitute it with '-1' .

57 = 00111001

In 2's compliment form, it is:  11000111 = -57

According to above rules: Booth Encoding Will Be: 0-100+100-1

Hence, Option B

Credit For The Quoted Explanation: @Habibkhan

Ref: https://gateoverflow.in/160574/booths-encoding

answered by Loyal (2.7k points)
+3 votes
57 in 2's compliment form = 11000111
So Q=11000111, q(_1 in suffix)=0

We know in bit pairs 00 and 11= ASR, 01=+,ASR , 10=-,ASR
So now           Q      q_1
               11000111  0
from right to left bit pair in reverse order                     (10)(11)(11)(01)(00)(00)(10)(11)
 so booth coding for 8 bit decimal number -57 is ------   
step 1=    -(1^0) (1^1) (1^1)  +(0^1) (0^0) (0^0) -(1^0) (1^1)
step 2=   - 1 0 0  + 1 0 0 - 1 0
step 3=reverse it= 0 - 1 0 0 + 1 0 0 - 1
answered by (45 points)
i don't understand:)
can please you explain more on step1,2,3 ?


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

33,646 questions
40,193 answers
114,176 comments
38,664 users