1 1 vote Lets say we have a 32bit instruction using immediate addressing mode, where the opcode is say 22bits, and u have to store a 32bit operand inside the remaining 10bits of the instruction. How would u do it? CO & Architecture interview iitm-interview + – srestha 3.1k views answer comment Share Follow Print See all 24 Comments 24 24 Comments reply Akriti sood commented Mar 15, 2017 reply Follow flag can we convert it into another format and store?like converting it into hexa format.. 0 0 replyShare akash.dinkar12 commented Mar 15, 2017 reply Follow flag we can use CISC based processor architecture because we can not increase or decrease instruction length in RISC based processors.. 0 0 replyShare utk0203 commented Mar 15, 2017 reply Follow flag In my opinion 10 bit should be divided into two parts 2 bits(4 possible codes ) and 8 bits(each code shold contain 8 bits =36 bits) but only needed is 32 bit , so it can be easily accomodated 0 0 replyShare Akriti sood commented Mar 15, 2017 reply Follow flag @utk203,i did nt get you. and how 8 bits = 36 bits?? 0 0 replyShare utk0203 commented Mar 15, 2017 i edited by utk0203 Mar 16, 2017 reply Follow flag we have remaining 10 bits we divided into 2 bits and 8 bits For 2 bits (4 codes ) for each code we have 8 bits to store operand value (we have enough to include 32 bit operand in 8+8+8+8=32 bits) 0 0 replyShare Arjun commented Mar 16, 2017 reply Follow flag How can I make 100 Rupees with 10 Rupees? 0 0 replyShare utk0203 commented Mar 16, 2017 reply Follow flag Sir, there is a problem given at 40:19 , how to economically using instruction set https://www.youtube.com/watch?v=p9wxyIx-j-c&index=12&list=PLC5FEB130D1CE6075&spfreload=10 same like that extending opcode field to +2 bits we can store operand value part wise like we use LDA to store 16 bit data we store in part wise [e.g. we have to store LDA 3000H then LDA 00H LDA 30H] 0 0 replyShare Akriti sood commented Mar 16, 2017 reply Follow flag @utk0203,i am still not able to understand this. you are saying that "For 2 bits (4 codes ) for each code we have 8 bits to store operand value (we have enough to include 32 bit operand in 8+8+8+8=36 bits)" how using just 8 bits,we will store 32 bit operand?we need '4' 8-bits to store 32 bits operand. 0 0 replyShare Akriti sood commented Mar 16, 2017 reply Follow flag @arjun sir,we will need '10' 10 rupee notes to make 100 rs. so are u saying like that we need '4' 8-bits to store 32 bits?but how can we do thi?? 0 0 replyShare utk0203 commented Mar 16, 2017 reply Follow flag yes 4 8 bits will be used to store 32 bits there was error I edited *(8+8+8+8=32) 0 0 replyShare Akriti sood commented Mar 16, 2017 reply Follow flag so,,how will u achieve it?will we take 4 instructions to store 32 bits?? 0 0 replyShare Arjun commented Mar 16, 2017 reply Follow flag @Akriti Not possible. 0 0 replyShare Akriti sood commented Mar 16, 2017 reply Follow flag what is not possible sir? 0 0 replyShare Arjun commented Mar 16, 2017 reply Follow flag We cannot have 32 bit immediate operand using 22 bits. 0 0 replyShare Akriti sood commented Mar 16, 2017 reply Follow flag alright..so with how many min bits we can acquire that?? 0 0 replyShare Arjun commented Mar 16, 2017 reply Follow flag 32 bits 0 0 replyShare akash.dinkar12 commented Mar 16, 2017 reply Follow flag sir plz.. explain??? 0 0 replyShare srestha commented Mar 16, 2017 reply Follow flag utk0203 why r u dividing 10 bits in 2 bits and 8 bits? 0 0 replyShare srestha commented Mar 16, 2017 reply Follow flag |------------opcode(22bits)--------------|------------remaining(10 bits)----| Now, how this 10 bits of instruction can accomodate 32 bit operand? do we have to think 1 address instruction for it? 0 0 replyShare srestha commented Mar 16, 2017 reply Follow flag Ans given :break into 4 8bit portions, and use the remaining 2 bits in each 10bit operand part to sequence them. but can anyone explain it is right or wrong? 0 0 replyShare srestha commented Mar 16, 2017 reply Follow flag @Arjun Sir do u mean question is not right? 0 0 replyShare Arjun commented Mar 17, 2017 reply Follow flag No, question is fine but there is no way of doing it. 0 0 replyShare srestha commented Mar 18, 2017 reply Follow flag how 32 bit operand be inside 10 bit instruction? 0 0 replyShare utk0203 commented Mar 18, 2017 reply Follow flag @srestha , See , It will stored as part wise first store least significant 8 bits and so on... [ why 8 bits to store operand because rest 2 bits is used to recognize all four different sets of (8bit slot)] In our microcontroller lab, 8086 microproc. , we used to store 3 byte instructions part wise , that led me to answer this . Note: - As Sir said,so this may not be correct . In interview you can try like this they will help you to reach the correct solution . 0 0 replyShare Please log in or register to add a comment.