Synchronization of old projects
Part1
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
namespace lesson14
|
||||
{
|
||||
class program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
#region 练习题一
|
||||
// 35 << 4 和 66 >> 1 的结果是多少?
|
||||
// 35 = 00100011
|
||||
// 35 << 4 = 001000110000 = 560
|
||||
Console.WriteLine(35 << 4);
|
||||
// 66 = 01000010
|
||||
// 66 >> 1 = 00100001 = 33
|
||||
Console.WriteLine(66 >> 1);
|
||||
#endregion
|
||||
|
||||
#region 练习题二
|
||||
// 99 ^ 33 和 76 | 85 的结果是多少?
|
||||
// 99 = 01100011
|
||||
// 33 = 00100001
|
||||
// 99 ^ 33 = 01000010 = 66
|
||||
Console.WriteLine(99 ^ 33);
|
||||
// 76 = 01001100
|
||||
// 85 = 01010101
|
||||
// 76 | 85 = 01011101 = 125
|
||||
Console.WriteLine(76 | 85);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user