Description

How well can you perfom basic binary operations?Start searching for the flag here nc titan.picoctf.net 64279


Steps :

1st question

Given Binary Numbers:

  1. Binary Number 1: 01011111 (Decimal: 95)
  2. Binary Number 2: 10111011 (Decimal: 187) Step 1: Multiply in Decimal 95 \times 187 = 17765

Step 2: Convert to Binary

  • 17765 = 100010101100101
  • So, the result of Operation 1 in binary is:

100010101100101 (15-bit binary)


2nd Question

Perform a right shift (>> 1) on the given Binary Number 2

Given Binary Number 2:

10111011  (Binary for 187 in decimal)

Step-by-Step Solution

Step 1: Understand Right Shift (>>)

  • Right shifting by 1 moves all bits one position to the right.
  • The rightmost bit is removed.
  • If the number is unsigned, a 0 is added on the left.

Step 2: Apply Right Shift (>> 1)

Original:   10111011 Shifted:    01011101

Final Answer: 01011101 (Binary)


Quick Reference: Right Shift (>>)

TypeEffect
Unsigned (>>)Adds 0 on the left
Signed (>>)Adds 1 if negative, 0 if positive
RemovesRightmost bit

Final Answer (Binary)

01011101


Continued on the book lol

╰─❯ nc titan.picoctf.net 51550                                               ─╯
 
Welcome to the Binary Challenge!"
Your task is to perform the unique operations in the given order and find the final result in hexadecimal that yields the flag.
 
Binary Number 1: 00000101
Binary Number 2: 01011100
 
 
Question 1/6:
Operation 1: '<<'
Perform a left shift of Binary Number 1 by 1 bits.
Enter the binary result: 00001010
Correct!
 
Question 2/6:
Operation 2: '&'
Perform the operation on Binary Number 1&2.
Enter the binary result: 00000100
Correct!
 
Question 3/6:
Operation 3: '|'
Perform the operation on Binary Number 1&2.
Enter the binary result: 101011101
Incorrect. Try again
Enter the binary result: 01011101
Correct!
 
Question 4/6:
Operation 4: '+'
Perform the operation on Binary Number 1&2.
Enter the binary result: 01111101
Incorrect. Try again
Enter the binary result: 01100001
Correct!
 
Question 5/6:
Operation 5: '>>'
Perform a right shift of Binary Number 2 by 1 bits .
Enter the binary result: 00101110
Correct!
 
Question 6/6:
Operation 6: '*'
Perform the operation on Binary Number 1&2.
Enter the binary result: 1010000
Incorrect. Try again
Enter the binary result: 1011000
Incorrect. Try again
Enter the binary result: 111001100
Correct!
 
Enter the results of the last operation in hexadecimal: 1CC
 
Correct answer!
The flag is: picoCTF{b1tw^3se_0p3eR@tI0n_su33essFuL_6ab1ad84}