As deep learning revolutionizes various fields, there has also been growing interest in combining deep learning with traditional security methods. While deep learning has shown promise, designing deep learning primitives, specifically for binary vulnerability and malware detection, is still unexplored. In this paper, we propose designing deep learning primitives for cyber security, such as convolutional neural networks (CNNs), de-obfuscation, explainable AI (XAI), and data augmentation. We demonstrate the effectiveness of the proposed deep learning primitives design by applying it to binary vulnerability and malware detection. (will be updated)