1 votes 1 votes 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 and Architecture interview iitm-interview + – srestha asked Mar 15, 2017 srestha 1.4k views answer comment Share Follow See all 24 Comments See all 24 24 Comments reply Akriti sood commented Mar 15, 2017 reply Follow Share can we convert it into another format and store?like converting it into hexa format.. 0 votes 0 votes akash.dinkar12 commented Mar 15, 2017 reply Follow Share we can use CISC based processor architecture because we can not increase or decrease instruction length in RISC based processors.. 0 votes 0 votes utk0203 commented Mar 15, 2017 reply Follow Share 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 votes 0 votes Akriti sood commented Mar 15, 2017 reply Follow Share @utk203,i did nt get you. and how 8 bits = 36 bits?? 0 votes 0 votes utk0203 commented Mar 15, 2017 i edited by utk0203 Mar 16, 2017 reply Follow Share 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 votes 0 votes Arjun commented Mar 16, 2017 reply Follow Share How can I make 100 Rupees with 10 Rupees? 0 votes 0 votes utk0203 commented Mar 16, 2017 reply Follow Share 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 votes 0 votes Akriti sood commented Mar 16, 2017 reply Follow Share @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 votes 0 votes Akriti sood commented Mar 16, 2017 reply Follow Share @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 votes 0 votes utk0203 commented Mar 16, 2017 reply Follow Share yes 4 8 bits will be used to store 32 bits there was error I edited *(8+8+8+8=32) 0 votes 0 votes Akriti sood commented Mar 16, 2017 reply Follow Share so,,how will u achieve it?will we take 4 instructions to store 32 bits?? 0 votes 0 votes Arjun commented Mar 16, 2017 reply Follow Share @Akriti Not possible. 0 votes 0 votes Akriti sood commented Mar 16, 2017 reply Follow Share what is not possible sir? 0 votes 0 votes Arjun commented Mar 16, 2017 reply Follow Share We cannot have 32 bit immediate operand using 22 bits. 0 votes 0 votes Akriti sood commented Mar 16, 2017 reply Follow Share alright..so with how many min bits we can acquire that?? 0 votes 0 votes Arjun commented Mar 16, 2017 reply Follow Share 32 bits 0 votes 0 votes akash.dinkar12 commented Mar 16, 2017 reply Follow Share sir plz.. explain??? 0 votes 0 votes srestha commented Mar 16, 2017 reply Follow Share utk0203 why r u dividing 10 bits in 2 bits and 8 bits? 0 votes 0 votes srestha commented Mar 16, 2017 reply Follow Share |------------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 votes 0 votes srestha commented Mar 16, 2017 reply Follow Share 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 votes 0 votes srestha commented Mar 16, 2017 reply Follow Share @Arjun Sir do u mean question is not right? 0 votes 0 votes Arjun commented Mar 17, 2017 reply Follow Share No, question is fine but there is no way of doing it. 0 votes 0 votes srestha commented Mar 18, 2017 reply Follow Share how 32 bit operand be inside 10 bit instruction? 0 votes 0 votes utk0203 commented Mar 18, 2017 reply Follow Share @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 votes 0 votes Please log in or register to add a comment.