TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Maha
NA
0
324.2k
Shift
Sep 29 2013 2:10 PM
You can see from this example right sift operator keep the original size of the bits always the same but left shift operator adding bits to the original size of the bits thus increasing the size of total bits. Please explain the differences. Problem is highlighted.
using System;
class Program
{
static void Main()
{
int value1 = 10;//
1010
int i = 1;
int shift = value1 >> i;
Console.WriteLine("{0}", shift);//
0101
=5
shift = value1 << i;
Console.WriteLine("\n{0}", shift);//
10100
=20
shift = value1 << 2;
Console.WriteLine("\n{0}", shift);//
101000
=40
shift = value1 >> 2;
Console.WriteLine("\n{0}", shift);//
0010
=2
Console.ReadKey();
}
}
Reply
Answers (
4
)
Rename the files with a rule of dates.
Server Emulator Question