This paper introduces a new theoretical framework for edge detection and pioneers a novel technical route grounded in this framework. In this paper, texture is defined as the disparity in optical properties between two distinct regions. Based on this definition, an XOR operator is devised to precisely extract gradient and orientation information of textures from binary images. By exploiting the bit independence property and the bit difference weighted sum property of binary numbers, the application scope of the XOR operator is expanded, resulting in a new algorithm applicable to all types of image —the Bitwise Texture Extraction Algorithm (BTE). Edge is defined as the texture that delineates the contours of visible objects. Based on this definition, an algorithm named the Bitwise Edge Extraction Algorithm (BEE) is proposed, which is for extracting edge information from the output of BTE. Subsequently, the application of the output of the BEE algorithm, the BEE Map, in instance segmentation tasks is discussed, and the BEE algorithm is optimized by leveraging the linear continuity of edges, enhancing its accuracy in assigning edge affiliations. Finally, this paper tackles the challenge of Edge-to-Noise Separation by defining image noise as all elements in an image that do not constitute target elements. Based on this novel definition, a new approach to noise filtering is introduced: by applying operations that preserve only valid edge clusters for each object within the BEE Map individually, and then combining these outcomes, a noise-free, pure edge map is achieved.