1 votes 1 votes A processor has $128$ distinct instructions. A $24-$bit instruction word has an opcode, register, and operand.The number of bits available for the operand field is $7.$The maximum possible value of the general-purpose register is _________ CO and Architecture testbook-test-series co-and-architecture instruction-format + – Lakshman Bhaiya asked Dec 23, 2018 • edited Mar 9, 2019 by ajaysoni1924 Lakshman Bhaiya 1.2k views answer comment Share Follow See all 26 Comments See all 26 26 Comments reply Lakshman Bhaiya commented Dec 23, 2018 reply Follow Share please explain in a detailed manner, I'm confused a bit. 0 votes 0 votes Mk Utkarsh commented Dec 23, 2018 reply Follow Share $log_2 128 = 7$ bits for opcode $7$ bits for operand $24-7 - 7 $ = $10$ bits for registers so max $1024$ registers is it correct? 2 votes 2 votes Lakshman Bhaiya commented Dec 23, 2018 reply Follow Share the answer is $1023?$ can you explain using some diagram, please I'm not able to understand the question. 0 votes 0 votes Mk Utkarsh commented Dec 23, 2018 reply Follow Share oh yes max possible value with 10 bits is 1023 0 votes 0 votes Mk Utkarsh commented Dec 23, 2018 reply Follow Share Lakshman solve this one first 0 votes 0 votes Magma commented Dec 23, 2018 reply Follow Share bro if this question ask in gate and if its NAT type question I definitely write 1024 :3 0 votes 0 votes Mk Utkarsh commented Dec 23, 2018 reply Follow Share Magma lol #metoo 0 votes 0 votes Lakshman Bhaiya commented Dec 23, 2018 reply Follow Share @Mk Utkarsh it starts from $0$, that's by maximum value $=1023$ I'm not learn this topic, can you explain using the diagram, please. 0 votes 0 votes Utkarsh Joshi commented Dec 23, 2018 reply Follow Share is it anywhere specified that registers are numbered starting from 0? No idea about this. Mk UtkarshMagma 0 votes 0 votes Lakshman Bhaiya commented Dec 23, 2018 reply Follow Share I don't know, can anyone please explain in a detailed way. 0 votes 0 votes Magma commented Dec 23, 2018 reply Follow Share They ask "max possible value " 10 bits used for general purpose register therefore from 10 bits ..max possible value : 2^10 -1 1 votes 1 votes Mk Utkarsh commented Dec 23, 2018 reply Follow Share Magma lots of twisting and turning, some might give 10bits others will answer 1024 and few will answer 1023 0 votes 0 votes Utkarsh Joshi commented Dec 23, 2018 reply Follow Share @Magma your opinion on above doubt? 0 votes 0 votes Aarvi Chawla commented Dec 23, 2018 reply Follow Share But with 10 bits, we can address the maximum value of 1023 (i.e., from 0 to 1023) and we are asked the value only. So 1023 should be the correct answer according to me 0 votes 0 votes Mk Utkarsh commented Dec 23, 2018 reply Follow Share Aarvi Chawla yes its correct Utkarsh Joshi 10bits hain toh numbering will start from 0 (its not mentioned but its understood) 1 votes 1 votes Magma commented Dec 23, 2018 i edited by Lakshman Bhaiya Dec 23, 2018 reply Follow Share @Utkarsh Joshi wrt me answer should be 1023 if they asked that "number of register used " then answer-- > 1024 "but here they asked "maximum possible value of the general-purpose register" -----> R0 to R1023 is it anywhere specified that registers are numbered starting from 0? yes , registers are numbered starting from 0 1 votes 1 votes srestha commented Dec 23, 2018 reply Follow Share Here 7 bits for operand field and say 128 instruction store there Now why again $24$ bit instruction word has an opcode, register, and operand I mean why operand field needs two times @Mk Utkarsh @Magma ? 0 votes 0 votes Mk Utkarsh commented Dec 23, 2018 reply Follow Share only 1 time which needs 7 bits registers need another 7bits 0 votes 0 votes srestha commented Dec 23, 2018 reply Follow Share I havenot got u 0 votes 0 votes Magma commented Dec 23, 2018 reply Follow Share The main components of an instruction are opcode (which instruction to be executed) and operands (data on which instruction to be executed) Operand field and opcode are two different things right ?? 0 votes 0 votes Mk Utkarsh commented Dec 23, 2018 reply Follow Share Magma yes srestha sorry, i thought you are asking something else. Opcode and operand serve 2 different purposes 0 votes 0 votes srestha commented Dec 23, 2018 reply Follow Share @Magma that is ok I was thinking the logic behind See the question A processor has 128 distinct instructions. A 24−bit instruction word has an opcode, register, and operand.The number of bits available for the operand field is 7.The maximum possible value of the general-purpose register is So, total instruction size 24 bits Among which 7 bits operand So, can we not say 24-7=17 bits for opcode and register? Now, among which 128 distinct instructions=> i.e. 7 bits for opcode Now remaining 17-7=10 bit for registers So, ans 1024? Is my logic correct? 0 votes 0 votes srestha commented Dec 23, 2018 reply Follow Share @Magma @Mk Utkarsh just a query Can u tell me In an 11−bit computer instruction format, the size of address field is 4−bits. what this line means? Does it means 11 bit instruction, 4 bit opcode and 7 bit operand? plz correct me 0 votes 0 votes balchandar reddy san commented Dec 23, 2018 reply Follow Share @shrestha yes, we use 10 bits for registers and there can be 1024 registers. but they will be addressed as R0,R1,......R1023 (1024 registers).. So the answer is 1023. 0 votes 0 votes Registered user 48 commented Dec 23, 2018 reply Follow Share Similar question was already asked in GATE https://gateoverflow.in/1767/gate2014-1-9 0 votes 0 votes srestha commented Dec 23, 2018 reply Follow Share yes, check my doubt there too @Magma @Mk Utkarsh plz tell 0 votes 0 votes Please log in or register to add a comment.