
 
#include<iostream>
#include<bitset>
class Light{
private:
	unsigned int Switch;
public:
	Light(unsigned int S)
	{
		this->Switch = S;
	}
	void ControlEveryL(unsigned int number);
	void OpenOneBlock(unsigned int target);
	void CloseOneBlock(unsigned int target);
	~Light() {};
}; 
void Light::ControlEveryL(unsigned int number)
{
	this->Switch = 1 << (number-1);
	std::cout << std::bitset<32>(this->Switch)<<(char)10;
}
void Light::OpenOneBlock(unsigned int target)
{
	
	unsigned int k = 0xff;
	k = k << 8*(target-1);
	this->Switch = this->Switch | k;
	std::cout << std::bitset<32>(this->Switch) << (char)10;
}
void Light::CloseOneBlock(unsigned int target)
{
	
	unsigned int k = 0xff;
	k = k << 8 * (target - 1);
	this->Switch = this->Switch & (~k);
	std::cout << std::bitset<32>(this->Switch) << (char)10;
}
int main()
{
	Light L1{2};
	
	
}