Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Insert m into n
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { static public void Main (){ int n = Convert.ToInt32("10000000000", 2); int m = Convert.ToInt32("10011", 2); int i = 2; int j = 6; int mask = -1 << j+1; int mask2 = ~(-1<<i); mask = mask | mask2; n = n & mask; m = m<<i; int x = m|n; Console.WriteLine(Convert.ToString(x, 2)); } } }
run
|
edit
|
history
|
help
0
Abstract Class
Crystals Plep
2.1 Basic types: Lists and Linq beauty
Remove BOLD formatting from html
Second minor int
sdfrgthyjuiloiujyhtgrf
UINT32toHEX
Square Integer Matrix
eg
test