Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace BitExchange
- {
- class Program
- {
- static void Main(string[] args)
- {
- uint input = uint.Parse(Console.ReadLine());
- uint bits345 = (input >> 3) & 7;
- uint bits242526 = (input >> 24) & 7;
- input &= ~((uint)7 << 3);
- input &= ~((uint)7 << 24);
- // uint magicNumber = Convert.ToUInt32("111110001111111111111111000111", 2);
- // trqs si naglasish nulichkite i tn, shtoto mai ne sa 32 ; )
- // i mai ne sa kydeto trea
- input |= bits345 << 24;
- input |= bits242526 << 3;
- Console.WriteLine(input);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement