HDLBits - Vectorgates

2024. 12. 15. 20:10·HDLBits/Verilog

Build a circuit that has two 3-bit inputs that computes
the bitwise-OR of the two vectors,
the logical-OR of the two vectors,
the inverse (NOT) of both vectors.
Place the inverse of b in the upper half of out_not (i.e., bits [5:3]), and the inverse of a in the lower half.

적힌대로 2개의 3-bit입력을 output으로 만드는 문제

Bitwise와 Logical Operators의 차이점은
단순 비트 연산과, 논리 연산 이라는 것에 차이가 있다.

https://hdlbits.01xz.net/wiki/Vectorgates

module top_module( 
    input [2:0] a,
    input [2:0] b,
    output [2:0] out_or_bitwise,
    output out_or_logical,
    output [5:0] out_not
);
    assign out_or_bitwise = a | b;
    assign out_or_logical = a || b;
    assign out_not = {~b, ~a};

endmodule
저작자표시 비영리 변경금지 (새창열림)
'HDLBits/Verilog' 카테고리의 다른 글
  • HDLBits - Vectorr
  • HDLBits - Gates4
  • HDLBits-Vector2
  • HDLBits - Vector1
Zi_Yoon
Zi_Yoon
머리 속에 정리하는 곳 <전자공학>
  • Zi_Yoon
    ZY_repo
    Zi_Yoon
  • 전체
    오늘
    어제
    • 분류 전체보기 (70)
      • HDLBits (25)
        • Verilog (19)
        • Circuits (4)
        • Verification (0)
      • IDEC 교육 (1)
        • Embedded C (13)
        • Verilog HDL (8)
      • Hardware (8)
        • RISC-V Project (1)
        • Computer Architecture (0)
        • AMBA (2)
        • FPGA (0)
        • 논문 읽기 (1)
        • ETC. (4)
      • 42서울 (13)
        • 리눅스 (12)
        • 네트워크 (1)
      • 생각 (1)
      • 취업 (1)
  • 블로그 메뉴

    • 홈
    • 태그
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    IDEC
    fucntion
    ssh
    RISC-V
    hdlbits
    bit-wise and
    AppArmor
    보안 쉘
    fpga
    pointer
    ARM
    research rabbit
    debian
    verilator
    QUARTUS
    APT
    AMBA
    centos
    signal trap
    charater
    embedded
    세션 키
    AXI4
    Keil
    lsblk
    axi
    c
    비대칭 키
    verilog
    vm
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.1
Zi_Yoon
HDLBits - Vectorgates

개인정보

  • 티스토리 홈
  • 포럼
  • 로그인
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.