Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
No of registers
srestha
asked
in
Compiler Design
Dec 23, 2017
461
views
0
votes
0
votes
What is minimum number of extra registers are required to swap 2 numbers, where 2 numbers are stored in two different registers?
register
srestha
asked
in
Compiler Design
Dec 23, 2017
by
srestha
461
views
answer
comment
Follow
share this
share
3 Comments
by
Ashwin Kulkarni
commented
Dec 23, 2017
reply
Follow
share this
0 extra registers.
R1 = R1+R2
R2 = R1-R2
R1 = R1 -R2
0
0
by
srestha
commented
Dec 23, 2017
reply
Follow
share this
say both registers contains value 8
then will it be swapped?
0
0
by
Ashwin Kulkarni
commented
Dec 23, 2017
reply
Follow
share this
Yes
R1 = 8, R2 = 8
R1 = 8+8 = 16
R2 = 16-8 = 8
R1 = 16-8 = 8
swapped. Result will be same. But what we want to achieved is achieved.
2
2
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
0
Answers
← Previous
Next →
← Previous in category
Next in category →
Related questions
0
votes
0
votes
1
answer
1
ajaysoni1924
asked
in
Digital Logic
May 22, 2018
847
views
Registers
How it is gray code conversion?....!!! i think output should be 00000000
ajaysoni1924
asked
in
Digital Logic
May 22, 2018
by
ajaysoni1924
847
views
register
digital-logic
1
vote
1
vote
1
answer
2
makhdoom ghaya
asked
in
CO and Architecture
Sep 30, 2016
942
views
UGC NET CSE | August 2016 | Part 3 | Question: 3
The register that stores the bits required to mask the interrupts is ______. Status register Interrupt service register Interrupt mask register Interrupt request register
makhdoom ghaya
asked
in
CO and Architecture
Sep 30, 2016
by
makhdoom ghaya
942
views
ugcnetcse-aug2016-paper3
co-and-architecture
register
interrupts
0
votes
0
votes
0
answers
3
saumya mishra
asked
in
Compiler Design
Jun 13, 2018
325
views
Minimum number of registers required
I am always getting wrong answer in these type of questions how to solve them in a correct manner please explain????
saumya mishra
asked
in
Compiler Design
Jun 13, 2018
by
saumya mishra
325
views
0
votes
0
votes
1
answer
4
amiteshKeshari
asked
in
CO and Architecture
Aug 24, 2023
357
views
Consider a one word instruction ADD R2,@R1 executed on Hypothetical CPU R1 and R2 are processing registers. Fetching operation takes 2 clock cycles, memory operand read takes 2 clock cycles and any ALU operation takes one clock cycles and extra clock is not required for storing the result in destination regiseter. No. of memory cycles needed to complete the insturction cycle of the above ADD R2,@R1 is .........
amiteshKeshari
asked
in
CO and Architecture
Aug 24, 2023
by
amiteshKeshari
357
views
co-and-architecture
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy