chamsi09

Untitled

Oct 18th, 2024
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.54 KB | None | 0 0
  1.     Module Module1
  2.     Sub Main()
  3.         Dim OldValue As Byte = &B11010110  ' Example 8-bit integer value with some markers detected
  4.         Dim mask As Byte = &B00001000      ' Mask to set bit at position 3 (BNP marker) to 1
  5.         Dim NewValue As Byte = OldValue Or mask ' Bitwise OR operation to ensure marker is set
  6.         Console.WriteLine("Original Value: " & Convert.ToString(OldValue, 2).PadLeft(8, "0"c))
  7.         Console.WriteLine("Result After Bitwise OR: " & Convert.ToString(NewValue, 2).PadLeft(8, "0"c))
  8.     End Sub
  9. End Module
  10.  
Advertisement
Add Comment
Please, Sign In to add comment